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
1 changed files with 7 additions and 1 deletions

View File

@ -185,7 +185,13 @@ export class Workbench {
_: [],
};
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 {
config.folderUri = workspace as URI;
}