Skip to content

Conversation

@mxcl
Copy link
Member

@mxcl mxcl commented Mar 21, 2025

Require sudo in order to perform write operations on /usr/local.

Commands that do not require write will still function against both possible prefixes.

@mxcl mxcl force-pushed the require-sudo-upfront branch 6 times, most recently from 74a3036 to fb76ee0 Compare March 21, 2025 15:31
Require `sudo` in order to perform write operations on /usr/local.

Commands that do not require write will still function against both possible prefixes.
@mxcl mxcl force-pushed the require-sudo-upfront branch from fb76ee0 to 15d60d7 Compare March 21, 2025 15:40
@jhheider
Copy link
Contributor

good amount of code deletion. the re-execute with sudo worked well, but definitely scary.

@mxcl mxcl merged commit fc35ac8 into main Mar 21, 2025
3 checks passed
@mxcl
Copy link
Member Author

mxcl commented Mar 21, 2025

We may want to compile the executable now. Running the source code with sudo works fine provided it has been run without sudo at least once since deno will just use the already downloaded deps to the user’s home directory. If the first time it is run as sudo then the files are written as root (probably, I have not tested this, possibly deno detects this and does what we do, ie. re-sudos as the previous user). This is only bad in that the user will have files written as root in their home dir.

@mxcl mxcl deleted the require-sudo-upfront branch March 21, 2025 16:15
@jhheider
Copy link
Contributor

really good point. running things that have local side effects under sudo causes that kind of obnoxious problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants