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 and c-claeys committed Feb 16, 2023
2 parents cfada01 + cd30120 commit c14d829
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 c14d829

Please sign in to comment.