From e631d78ddfbf808fd1cfc4d79039a1b3acda5bed Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Wed, 8 Feb 2023 12:18:28 +0100 Subject: [PATCH] vscode: fix erroneous application of lib.optional (#3655) --- modules/programs/vscode.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix index 414e7451..cdc66578 100644 --- a/modules/programs/vscode.nix +++ b/modules/programs/vscode.nix @@ -221,7 +221,7 @@ in { builtins.attrNames (builtins.readDir (ext + "/${subDir}"))); in if cfg.mutableExtensionsDir then mkMerge (concatMap toPaths cfg.extensions - ++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0") [{ + ++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0") { # Whenever our immutable extensions.json changes, force VSCode to regenerate # extensions.json with both mutable and immutable extensions. "${extensionPath}/.extensions-immutable.json" = { @@ -232,14 +232,14 @@ in { $DRY_RUN_CMD ${getExe cfg.package} --list-extensions > /dev/null ''; }; - }]) + }) else { "${extensionPath}".source = let combinedExtensionsDrv = pkgs.buildEnv { name = "vscode-extensions"; paths = cfg.extensions ++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0") - [ extensionJsonFile ]; + extensionJsonFile; }; in "${combinedExtensionsDrv}/${subDir}"; }))