Add check for Windows and use windows specific 'mv' command

This commit is contained in:
Ryan Rushton 2015-03-25 09:21:12 -07:00
parent 239b3678ae
commit f060995096
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ getCmd = (inputPath, outputPath, options) ->
if fixers
fixerOption = " --fixers=#{fixers} "
cmd = "#{levelOption} #{fixerOption} \"#{inputPath}\") || (mv \"#{inputPath}\" \"#{outputPath}\")"
if process.platform == 'win32'
cmd = "#{levelOption} #{fixerOption} \"#{inputPath}\") & move \"#{inputPath}\" \"#{outputPath}\""
else
cmd = "#{levelOption} #{fixerOption} \"#{inputPath}\") || (mv \"#{inputPath}\" \"#{outputPath}\")"
if phpCsFixerPath
# Use absolute path