-
Notifications
You must be signed in to change notification settings - Fork 623
fix(install_cli): sudo: command not found on certain machines
#3413
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an installation issue where the Genkit CLI install script fails on machines without sudo privileges. The fix implements fallback installation logic that uses ~/.local/bin when sudo is not available or when the user cannot write to the global installation directory.
- Adds smart installation logic that checks for sudo availability and directory write permissions
- Fixes installation detection to properly identify existing executables vs environment variables
- Adds GitHub Actions workflow to reproduce and validate the sudo-less installation scenario
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@cabljac were you able to repro this in Firebase Studio? You can just create a workspace in https://idx.google.com IDX is nix. I think in their setup the problem might be that you don't get root access at all (can't sudo nor su). I wonder if we need a "local=true" install option that writes the binary to |
- Add explicit local install option (GENKIT_INSTALL=local, local=true) - Improve sudo detection with has_usable_sudo() helper - Better uninstall logic with proper target detection - Enhanced PATH guidance for user-local installs - Add error suppression for graceful failure handling - Support cloud environments without sudo access
- Add --debug/-d flag for verbose diagnostics (shows stderr from version probes) - Namespace local install env var as GENKIT_CLI_LOCAL for consistency - Improve --local help text to mention ~/.local/bin and sudo use case - Add DEBUG=1 environment variable support
Firebase Studio integration was reportedly getting the following:
This PR:
act.