Ensure workspace configPath is a valid URI object (#317)
This commit is contained in:
parent
80c19878e0
commit
cdc40d36ff
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue