Archived
1
0

Ensure workspace configPath is a valid URI object (#317)

This commit is contained in:
Forest Hoffman 2019-03-22 16:58:37 -05:00 committed by Kyle Carberry
parent 80c19878e0
commit cdc40d36ff

View File

@ -185,7 +185,13 @@ export class Workbench {
_: [], _: [],
}; };
if ((workspace as IWorkspaceIdentifier).configPath) { if ((workspace as IWorkspaceIdentifier).configPath) {
config.workspace = workspace as IWorkspaceIdentifier; // tslint:disable-next-line:no-any
let wid: IWorkspaceIdentifier = (<any>Object).assign({}, workspace);
if (!URI.isUri(wid.configPath)) {
// Ensure that the configPath is a valid URI.
wid.configPath = URI.file(wid.configPath);
}
config.workspace = wid;
} else { } else {
config.folderUri = workspace as URI; config.folderUri = workspace as URI;
} }