Skip to content

Commit

Permalink
Use first root dir by default for ts service client
Browse files Browse the repository at this point in the history
  • Loading branch information
nthh committed Jul 1, 2023
1 parent d1ae1ff commit f642cf3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,12 @@ export default class TypeScriptServiceClient extends Disposable implements IType
}
}

return undefined;
const tsRootPath = this.toTsFilePath(roots[0].uri);
if (!tsRootPath || tsRootPath.startsWith(inMemoryResourcePrefix)) {
return undefined;
}

return roots[0].uri;
}

public execute(command: keyof TypeScriptRequests, args: any, token: vscode.CancellationToken, config?: ExecConfig): Promise<ServerResponse.Response<Proto.Response>> {
Expand Down

0 comments on commit f642cf3

Please sign in to comment.