mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-22 11:19:32 +00:00
committed by
Alex Ross
parent
728c6a68ba
commit
36e7f1871a
@@ -96,6 +96,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
const uri = editor.document.uri;
|
||||
return [{
|
||||
path: uri.fsPath,
|
||||
posixPath: uri.path,
|
||||
workspaceFolder: vscode.workspace.getWorkspaceFolder(uri)
|
||||
}];
|
||||
}
|
||||
@@ -121,6 +122,7 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
const folder = vscode.workspace.getWorkspaceFolder(uri);
|
||||
return [{
|
||||
path: normalizedConfigPath,
|
||||
posixPath: uri.path,
|
||||
workspaceFolder: folder
|
||||
}];
|
||||
}
|
||||
@@ -232,9 +234,9 @@ class TscTaskProvider implements vscode.TaskProvider {
|
||||
|
||||
private getLabelForTasks(project: TSConfig): string {
|
||||
if (project.workspaceFolder) {
|
||||
return path.relative(project.workspaceFolder.uri.fsPath, project.path);
|
||||
return path.posix.relative(project.workspaceFolder.uri.path, project.posixPath);
|
||||
}
|
||||
return project.path;
|
||||
return project.posixPath;
|
||||
}
|
||||
|
||||
private onConfigurationChanged(): void {
|
||||
|
||||
@@ -6,6 +6,7 @@ import * as vscode from 'vscode';
|
||||
|
||||
export interface TSConfig {
|
||||
readonly path: string;
|
||||
readonly posixPath: string;
|
||||
readonly workspaceFolder?: vscode.WorkspaceFolder;
|
||||
}
|
||||
|
||||
@@ -20,6 +21,7 @@ export default class TsConfigProvider {
|
||||
if (root) {
|
||||
configs.set(config.fsPath, {
|
||||
path: config.fsPath,
|
||||
posixPath: config.path,
|
||||
workspaceFolder: root
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user