-
Notifications
You must be signed in to change notification settings - Fork 18
Add --no-interaction flag to prevent Git/SSH prompts in package commands #206
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
3edda0e
415fb60
f8ca62d
e68d8d6
60df40b
249e76e
0a6dc7f
a6df039
27ab934
1b84407
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -199,6 +199,9 @@ public function browse( $_, $assoc_args ) { | |||||
| * [--insecure] | ||||||
| * : Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack. | ||||||
| * | ||||||
| * [--interaction] | ||||||
| * : Do not ask any interactive questions. Useful for scripting. | ||||||
| * | ||||||
| * ## EXAMPLES | ||||||
| * | ||||||
| * # Install a package hosted at a git URL. | ||||||
|
|
@@ -216,7 +219,12 @@ public function browse( $_, $assoc_args ) { | |||||
| public function install( $args, $assoc_args ) { | ||||||
| list( $package_name ) = $args; | ||||||
|
|
||||||
| $insecure = (bool) Utils\get_flag_value( $assoc_args, 'insecure', false ); | ||||||
| $insecure = (bool) Utils\get_flag_value( $assoc_args, 'insecure', false ); | ||||||
| $interaction = Utils\get_flag_value( $assoc_args, 'interaction', true ); | ||||||
|
||||||
| $interaction = Utils\get_flag_value( $assoc_args, 'interaction', true ); | |
| $interaction = (bool) Utils\get_flag_value( $assoc_args, 'interaction', true ); |
swissspidy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Copilot
AI
Dec 19, 2025
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.
The interaction flag should be explicitly cast to boolean for consistency with how the insecure flag is handled elsewhere in this file (lines 222, 602) and for type safety.
| $interaction = Utils\get_flag_value( $assoc_args, 'interaction', true ); | |
| $interaction = (bool) Utils\get_flag_value( $assoc_args, 'interaction', true ); |
swissspidy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Copilot
AI
Dec 19, 2025
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.
The interaction flag should be explicitly cast to boolean like the insecure flag on line 602 for consistency and type safety. While Utils\get_flag_value returns a boolean-ish value, explicit casting makes the intent clear and ensures consistent behavior.
| $interaction = Utils\get_flag_value( $assoc_args, 'interaction', true ); | |
| $interaction = (bool) Utils\get_flag_value( $assoc_args, 'interaction', true ); |
Uh oh!
There was an error while loading. Please reload this page.