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) {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user