Skip to content

Commit 1eef3e0

Browse files
committed
If there is no file edited during dry-run, we don't ask to client to remove dry-run option
1 parent ca3da75 commit 1eef3e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/php-cs-fixer.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ fun! PhpCsFixerFix(path, dry_run)
5252
endif
5353
endif
5454

55-
if a:dry_run == 1
55+
" if there is no cs to fix, we have not to ask for remove dry run
56+
if a:dry_run == 1 && s:nbFilesModified > 0
5657
let l:confirmed = confirm("Do you want to launch command without dry-run option ?", "&Yes\n&No", 2)
5758
if l:confirmed == 1
5859
call PhpCsFixerFix(a:path, 0)

0 commit comments

Comments
 (0)