feat: add sudo loop#1803
Merged
GideonBear merged 5 commits intotopgrade-rs:mainfrom Apr 5, 2026
Merged
Conversation
| // going through a shell (which could be powershell) first. | ||
| // See: https://gerardog.github.io/gsudo/docs/usage | ||
| cmd.args(["-d", "cmd.exe", "/c", "rem"]); | ||
| // TODO: `gsudo cache on` starts a session with cached credentials and could replace the dummy `rem` invocation here when sudo_loop is enabled... |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
barkleesanders
added a commit
to barkleesanders/topgrade
that referenced
this pull request
Mar 8, 2026
From PR topgrade-rs#1803 by uwuclxdy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GideonBear
requested changes
Apr 5, 2026
Member
|
I tested it with: [commands]
"one" = "sudo echo start"
"two" = "sleep 960"
"three" = "sudo echo done"cargo run -- --only custom_commands --custom-commands one --custom-commands two --custom-commands three
So it works |
GideonBear
approved these changes
Apr 5, 2026
GideonBear
requested changes
Apr 5, 2026
GideonBear
approved these changes
Apr 5, 2026
Merged
Closed
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do
Implements sudo loop in a background thread to avoid password re-prompts. Optionally enabled with
--sudoloopand--sudoloop-interval [SECONDS]or via config.toml:Standards checklist
CONTRIBUTING.mdFixes #1471