Skip to content

Commit 3473ef6

Browse files
committed
fix: rebase the sourceRoot for proper absolute root resolution
Fixes microsoft/vscode#108418
1 parent e9d330f commit 3473ef6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/targets/node/nodeSourcePathResolver.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import * as path from 'path';
66
import { URL } from 'url';
7+
import { IFsUtils } from '../../common/fsUtils';
8+
import { ILogger } from '../../common/logging';
79
import { fixDriveLetterAndSlashes, properResolve } from '../../common/pathUtils';
810
import { SourceMap } from '../../common/sourceMaps/sourceMap';
911
import {
@@ -14,8 +16,6 @@ import {
1416
import { IUrlResolution } from '../../common/sourcePathResolver';
1517
import * as urlUtils from '../../common/urlUtils';
1618
import { ISourcePathResolverOptions, SourcePathResolverBase } from '../sourcePathResolver';
17-
import { IFsUtils } from '../../common/fsUtils';
18-
import { ILogger } from '../../common/logging';
1919

2020
interface IOptions extends ISourcePathResolverOptions {
2121
basePath?: string;
@@ -91,7 +91,7 @@ export class NodeSourcePathResolver extends SourcePathResolverBase<IOptions> {
9191
if (!path.isAbsolute(url) && this.options.basePath) {
9292
url = properResolve(
9393
await getComputedSourceRoot(
94-
map.sourceRoot,
94+
this.rebaseRemoteToLocal(map.sourceRoot),
9595
map.metadata.compiledPath,
9696
{ '/': this.options.basePath },
9797
moduleAwarePathMappingResolver(this.fsUtils, map.metadata.compiledPath),

0 commit comments

Comments
 (0)