Skip to content

Commit cdc40d3

Browse files
foresthoffmankylecarbs
authored andcommitted
Ensure workspace configPath is a valid URI object (#317)
1 parent 80c1987 commit cdc40d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/vscode/src/workbench.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,13 @@ export class Workbench {
185185
_: [],
186186
};
187187
if ((workspace as IWorkspaceIdentifier).configPath) {
188-
config.workspace = workspace as IWorkspaceIdentifier;
188+
// tslint:disable-next-line:no-any
189+
let wid: IWorkspaceIdentifier = (<any>Object).assign({}, workspace);
190+
if (!URI.isUri(wid.configPath)) {
191+
// Ensure that the configPath is a valid URI.
192+
wid.configPath = URI.file(wid.configPath);
193+
}
194+
config.workspace = wid;
189195
} else {
190196
config.folderUri = workspace as URI;
191197
}

0 commit comments

Comments
 (0)