Skip to content

Commit

Permalink
Merge pull request microsoft#173378 from microsoft/tyriar/172225
Browse files Browse the repository at this point in the history
Return original path when wslpath fails
  • Loading branch information
Tyriar authored Feb 3, 2023
2 parents 5a64e8b + da84420 commit fa7ae04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/platform/terminal/node/ptyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export class PtyService extends Disposable implements IPtyService {
}
return new Promise<string>(c => {
const proc = execFile(wslExecutable, ['-e', 'wslpath', original], {}, (error, stdout, stderr) => {
c(escapeNonWindowsPath(stdout.trim()));
c(error ? original : escapeNonWindowsPath(stdout.trim()));
});
proc.stdin!.end();
});
Expand All @@ -383,7 +383,7 @@ export class PtyService extends Disposable implements IPtyService {
}
return new Promise<string>(c => {
const proc = execFile(wslExecutable, ['-e', 'wslpath', '-w', original], {}, (error, stdout, stderr) => {
c(stdout.trim());
c(error ? original : stdout.trim());
});
proc.stdin!.end();
});
Expand Down

0 comments on commit fa7ae04

Please sign in to comment.