Skip to content

running install script to user owned folder asks for sudo pass #1372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ekovacs opened this issue Apr 4, 2025 · 0 comments
Open

running install script to user owned folder asks for sudo pass #1372

ekovacs opened this issue Apr 4, 2025 · 0 comments

Comments

@ekovacs
Copy link

ekovacs commented Apr 4, 2025

the install script allows for custom $INSTALL_DIR to be specified

https://github.com/speakeasy-api/speakeasy/blob/c6e38dae8def31b26197fc65bbb3d7344df495ae/install.sh#L12C1-L12C12

such install-dir may be owned by the running user and should only ask for sudo PASS only if its required:

speakeasy/install.sh

Lines 168 to 170 in c6e38da

sudo_cmd='mv '"$tmp_dir/$BINARY_NAME"' '"$INSTALL_DIR"' && chmod a+x '"$INSTALL_DIR/$BINARY_NAME"
sudo -p "sudo password required for installing to $INSTALL_DIR: " -- sh -c "$sudo_cmd"
echo "Installed speakeasy to $INSTALL_DIR"

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

No branches or pull requests

1 participant