Skip to content

Commit

Permalink
Merge pull request #170564 from microsoft/tyriar/169271
Browse files Browse the repository at this point in the history
Resolve path before parsing URI
  • Loading branch information
Tyriar committed Jan 5, 2023
2 parents dda26d3 + fe40d21 commit 277131e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2529,7 +2529,10 @@ export class TerminalLabelComputer extends Disposable {

// Only set cwdFolder if detection is on
if (templateProperties.cwd && detection && (!this._instance.shellLaunchConfig.isFeatureTerminal || labelType === TerminalLabelType.Title)) {
const cwdUri = URI.from({ scheme: this._instance.workspaceFolder?.uri.scheme || Schemas.file, path: this._instance.cwd });
const cwdUri = URI.from({
scheme: this._instance.workspaceFolder?.uri.scheme || Schemas.file,
path: this._instance.cwd ? path.resolve(this._instance.cwd) : undefined
});
// Multi-root workspaces always show cwdFolder to disambiguate them, otherwise only show
// when it differs from the workspace folder in which it was launched from
let showCwd = false;
Expand Down

0 comments on commit 277131e

Please sign in to comment.