microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
194 stars 58 forks source link

Permission denied error when pre-configure script is run on a shared Linux environment #475

Closed ryan-phillips closed 9 months ago

ryan-phillips commented 1 year ago

When multiple users on a shared Linux environment use the makefile.preConfigureScript setting, the following error appears in the output:

/tmp/wrapPreconfigureScript.sh: line 2: /tmp/wrapPreconfigureScript.out: Permission denied

Furthermore, "Makefile: Pre-Configure" will sometimes run a pre-configure script created by a different user, since /tmp/wrapPreconfigureScript.sh can only be overwritten by the user who first created it.

Other extensions put temporary files in the path of the XDG_RUNTIME_DIR environment variable, when it is set. Currently, '/tmp' is hard-coded here:

https://github.com/microsoft/vscode-makefile-tools/blob/7b3cc9f1d002615bac9fa4429e46c24cff3debe5/src/util.ts#L93

andreeis commented 1 year ago

@ryan-phillips , thank you for the suggestion. We did not realize this situation and also I wasn't familiar with the XDG_RUNTIME_DIR environment variable on linux. Easy fix, we'll get it in the next 0.8.0 release.

github-actions[bot] commented 9 months ago

:tada: This issue has now been fixed and is now available in the latest release! :tada: