1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 13:15:25 +00:00

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) {
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;
}