diff options
author | Kreyren <kreyren@fsfe.org> | 2021-10-24 17:45:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-24 17:45:53 +0200 |
commit | d1542854f66cd4c38be0abbf7f80e5d02ca26e0c (patch) | |
tree | 6faaa02788567e41f0544b4234c92941f6bfbd95 /pkgs/applications/editors | |
parent | cd2b95a439283b593179129c8e9868bc56b0be2c (diff) |
vscode: quote variables (#142735)
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/vscode/generic.nix | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 7a3f34828ee24..8924b669c4a85 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -81,25 +81,25 @@ let installPhase = '' runHook preInstall '' + (if stdenv.isDarwin then '' - mkdir -p "$out/Applications/${longName}.app" $out/bin + mkdir -p "$out/Applications/${longName}.app" "$out/bin" cp -r ./* "$out/Applications/${longName}.app" - ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" $out/bin/${executableName} + ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}" '' else '' - mkdir -p $out/lib/vscode $out/bin - cp -r ./* $out/lib/vscode + mkdir -p "$out/lib/vscode" "$out/bin" + cp -r ./* "$out/lib/vscode" - ln -s $out/lib/vscode/bin/${sourceExecutableName} $out/bin/${executableName} + ln -s "$out/lib/vscode/bin/${sourceExecutableName}" "$out/bin/${executableName}" - mkdir -p $out/share/applications - ln -s $desktopItem/share/applications/${executableName}.desktop $out/share/applications/${executableName}.desktop - ln -s $urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop $out/share/applications/${executableName}-url-handler.desktop + mkdir -p "$out/share/applications" + ln -s "$desktopItem/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop" + ln -s "$urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop" "$out/share/applications/${executableName}-url-handler.desktop" - mkdir -p $out/share/pixmaps - cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png + mkdir -p "$out/share/pixmaps" + cp "$out/lib/vscode/resources/app/resources/linux/code.png" "$out/share/pixmaps/code.png" # Override the previously determined VSCODE_PATH with the one we know to be correct - sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName} - grep -q "VSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName} # check if sed succeeded + sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" + grep -q "VSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" # check if sed succeeded '') + '' runHook postInstall ''; @@ -162,9 +162,9 @@ let # restore desktop item icons extraInstallCommands = '' - mkdir -p $out/share/applications + mkdir -p "$out/share/applications" for item in ${unwrapped}/share/applications/*.desktop; do - ln -s $item $out/share/applications/ + ln -s "$item" "$out/share/applications/" done ''; |