Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#61516 - [code] 1.30.2-1 not able to save a file with sudo (but should)
Attached to Project:
Community Packages
Opened by No Name (Jaja) - Thursday, 24 January 2019, 13:14 GMT
Last edited by Filipe Laíns (FFY00) - Wednesday, 16 October 2019, 23:33 GMT
Opened by No Name (Jaja) - Thursday, 24 January 2019, 13:14 GMT
Last edited by Filipe Laíns (FFY00) - Wednesday, 16 October 2019, 23:33 GMT
|
DetailsDescription:
When trying to save a file with insufficient permissions, vscode pops up a notification. You can now "retry with sudo". However, this does not work. AUR package 'visual-studio-code-bin' works like expected so its not an upstream issue. Additional info: * package version(s) · code 1.30.2-1 · gnome 3.30 * config and/or log files etc. · out-of-box behavior Steps to reproduce: · [user@machine ~]$ code /etc/fstab · change a line… · ^s (save) and click on "retry as sudo" |
This task depends upon
sudo[14275]: <user> : a password is required ; TTY=unknown ; PWD=/home/<user> ; USER=root ; COMMAND=/usr/lib/electron/bin/code-oss --file-write /tmp/code-elevated-vtaboo /etc/fuse.conf
The relevant code is in src/vs/platform/environment/node/environmentService.ts
if (isLinux) {
if (isBuilt) {
return path.join(path.dirname(execPath), 'bin', `${product.applicationName}`);
}
return path.join(appRoot, 'scripts', 'code-cli.sh');
}
execPath is resolved as /usr/lib/electron, to which "bin" is appended followed by "code-oss" as defined as applicationName in product.json
upstream is accepting PRs to solve this issue:
see https://github.com/microsoft/vscode/issues/82266,
specifically https://github.com/microsoft/vscode/issues/82266#issuecomment-541701097
I'd be great if this issue was re-opened, allowing additional related discussion.
Also, any feedback to the vscode repo issue mentioned above would be highly appreciated - let's solve this!