From f06099509626bf65d37cdc0ecd84927f1aafca4d Mon Sep 17 00:00:00 2001 From: Ryan Rushton Date: Wed, 25 Mar 2015 09:21:12 -0700 Subject: [PATCH] Add check for Windows and use windows specific 'mv' command --- lib/langs/php-beautify.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/langs/php-beautify.coffee b/lib/langs/php-beautify.coffee index 70ed6f5..f36fdc5 100644 --- a/lib/langs/php-beautify.coffee +++ b/lib/langs/php-beautify.coffee @@ -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