vscode-extensions: Find mutable extensions by version in order not to delete them
Do not use sudo.
This commit is contained in:
parent
e708176d43
commit
97df56158e
|
@ -18,7 +18,11 @@ let
|
|||
|
||||
#removed not defined extensions
|
||||
rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) ''
|
||||
find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${lib.concatMapStringsSep " " (e : ''! -iname ${e.publisher}.${e.name}'') (nixExtensions++mutableExtensions)} -exec sudo rm -rf {} \;
|
||||
find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${
|
||||
lib.concatMapStringsSep " " (e : ''! -iname ${e.publisher}.${e.name} '') nixExtensions
|
||||
+
|
||||
lib.concatMapStringsSep " " (e : ''! -iname ${e.publisher}.${e.name}-${e.version} '') mutableExtensions
|
||||
} -exec rm -rf {} \;
|
||||
'';
|
||||
#copy mutable extension out of the nix store
|
||||
cpExtensions = ''
|
||||
|
|
Loading…
Reference in New Issue