mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
vscode: preserve permissions of unpacked ASAR files
This commit is contained in:
@@ -414,6 +414,13 @@ stdenv.mkDerivation (
|
||||
packed="resources/app/node_modules.asar"
|
||||
unpacked="resources/app/node_modules"
|
||||
asar extract "$packed" "$unpacked"
|
||||
|
||||
# FIXME: drop this when `asar extract` preserves the mode of unpacked files in
|
||||
# the archives Microsoft ships, fixes https://github.com/NixOS/nixpkgs/issues/573021
|
||||
if [ -d "$packed.unpacked" ]; then
|
||||
cp -a "$packed.unpacked/." "$unpacked/"
|
||||
fi
|
||||
|
||||
substituteInPlace $unpacked/@vscode/sudo-prompt/index.js \
|
||||
--replace-fail "/usr/bin/pkexec" "/run/wrappers/bin/pkexec" \
|
||||
--replace-fail "/bin/bash" "${bash}/bin/bash"
|
||||
|
||||
Reference in New Issue
Block a user