From c11d5fe9e6a52e80b85c2d95299af4c22d276e8e Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 12 Aug 2019 14:27:11 -0500 Subject: [PATCH] Fix error when passing empty extra extension dir flag --- scripts/vscode.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vscode.patch b/scripts/vscode.patch index 681948a8..a6642940 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -234,7 +234,7 @@ index a6c9eb9d11..3f8995b727 100644 + extraBuiltinExtensionPaths: string[]; } 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 +++ b/src/vs/platform/environment/node/environmentService.ts @@ -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) => parsePathArg(p, process)); + } + private arrayify(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) {