diff --git a/src/lint/ArcanistLintPatcher.php b/src/lint/ArcanistLintPatcher.php --- a/src/lint/ArcanistLintPatcher.php +++ b/src/lint/ArcanistLintPatcher.php @@ -42,11 +42,19 @@ // supported under OSX. if (Filesystem::pathExists($path)) { // This path may not exist if we're generating a new file. - execx('cp -p %s %s', $path, $lint); + if (phutil_is_windows()) { + execx('copy %s %s', $path, $lint); + } else { + execx('cp -p %s %s', $path, $lint); + } } Filesystem::writeFile($lint, $data); - list($err) = exec_manual('mv -f %s %s', $lint, $path); + if (phutil_is_windows()) { + list($err) = exec_manual('move /Y %s %s', $lint, $path); + } else { + list($err) = exec_manual('mv -f %s %s', $lint, $path); + } if ($err) { throw new Exception( pht(