mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
vscode: fix erroneous application of lib.optional (#3655)
This commit is contained in:
parent
d7a5a28fc3
commit
e631d78ddf
1 changed files with 3 additions and 3 deletions
|
@ -221,7 +221,7 @@ in {
|
||||||
builtins.attrNames (builtins.readDir (ext + "/${subDir}")));
|
builtins.attrNames (builtins.readDir (ext + "/${subDir}")));
|
||||||
in if cfg.mutableExtensionsDir then
|
in if cfg.mutableExtensionsDir then
|
||||||
mkMerge (concatMap toPaths cfg.extensions
|
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
|
# Whenever our immutable extensions.json changes, force VSCode to regenerate
|
||||||
# extensions.json with both mutable and immutable extensions.
|
# extensions.json with both mutable and immutable extensions.
|
||||||
"${extensionPath}/.extensions-immutable.json" = {
|
"${extensionPath}/.extensions-immutable.json" = {
|
||||||
|
@ -232,14 +232,14 @@ in {
|
||||||
$DRY_RUN_CMD ${getExe cfg.package} --list-extensions > /dev/null
|
$DRY_RUN_CMD ${getExe cfg.package} --list-extensions > /dev/null
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}])
|
})
|
||||||
else {
|
else {
|
||||||
"${extensionPath}".source = let
|
"${extensionPath}".source = let
|
||||||
combinedExtensionsDrv = pkgs.buildEnv {
|
combinedExtensionsDrv = pkgs.buildEnv {
|
||||||
name = "vscode-extensions";
|
name = "vscode-extensions";
|
||||||
paths = cfg.extensions
|
paths = cfg.extensions
|
||||||
++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0")
|
++ lib.optional (lib.versionAtLeast vscodeVersion "1.74.0")
|
||||||
[ extensionJsonFile ];
|
extensionJsonFile;
|
||||||
};
|
};
|
||||||
in "${combinedExtensionsDrv}/${subDir}";
|
in "${combinedExtensionsDrv}/${subDir}";
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in a new issue