Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
Windows: Fix cd when cwd is on another drive
Browse files Browse the repository at this point in the history
  • Loading branch information
jorangreef committed Mar 22, 2018
1 parent 8aef042 commit f677081
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,8 @@ function WindowsWriteCommandScript(instance, end) {
script.push('@echo off');
// Set code page to UTF-8:
script.push('chcp 65001>nul');
script.push('cd "' + cwd + '"');
// We pass /d as an option in case the cwd is on another drive (issue 70):
script.push('cd /d "' + cwd + '"');
script.push(instance.command);
script = script.join('\r\n');
Node.fs.writeFile(instance.pathCommand, script, 'utf-8', end);
Expand Down

0 comments on commit f677081

Please sign in to comment.