Skip to content

Commit

Permalink
Merge pull request #251 from rrushton/master
Browse files Browse the repository at this point in the history
Add check for Windows and use windows specific 'mv' command

See #248
  • Loading branch information
Glavin001 committed Mar 25, 2015
2 parents 31aa5fd + f060995 commit a0576c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/langs/php-beautify.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0576c4

Please sign in to comment.