Fix error when passing empty extra extension dir flag
This commit is contained in:
parent
90e8714e71
commit
c11d5fe9e6
@ -234,7 +234,7 @@ index a6c9eb9d11..3f8995b727 100644
|
|||||||
+ extraBuiltinExtensionPaths: string[];
|
+ extraBuiltinExtensionPaths: string[];
|
||||||
}
|
}
|
||||||
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
|
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
|
||||||
index 9373b22383..33ebcfc081 100644
|
index 9373b22383..a98ff4723c 100644
|
||||||
--- a/src/vs/platform/environment/node/environmentService.ts
|
--- a/src/vs/platform/environment/node/environmentService.ts
|
||||||
+++ b/src/vs/platform/environment/node/environmentService.ts
|
+++ b/src/vs/platform/environment/node/environmentService.ts
|
||||||
@@ -277,6 +277,15 @@ export class EnvironmentService implements IEnvironmentService {
|
@@ -277,6 +277,15 @@ export class EnvironmentService implements IEnvironmentService {
|
||||||
@ -248,7 +248,7 @@ index 9373b22383..33ebcfc081 100644
|
|||||||
+ return this.arrayify(this._args['extra-builtin-extensions-dir']).map((p) => <string>parsePathArg(p, process));
|
+ return this.arrayify(this._args['extra-builtin-extensions-dir']).map((p) => <string>parsePathArg(p, process));
|
||||||
+ }
|
+ }
|
||||||
+ private arrayify<T>(arg: T | T[] = []): T[] {
|
+ private arrayify<T>(arg: T | T[] = []): T[] {
|
||||||
+ return (Array.isArray(arg) ? arg : [arg]);
|
+ return (Array.isArray(arg) ? arg : [arg]).filter((p) => !!p);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
constructor(private _args: ParsedArgs, private _execPath: string) {
|
constructor(private _args: ParsedArgs, private _execPath: string) {
|
||||||
|
Reference in New Issue
Block a user