Skip to content

fix: --save-defaults elevates like a normal run - #10

Merged
codewiththiha merged 1 commit into
mainfrom
fix/save-defaults-elevates
Aug 4, 2026
Merged

fix: --save-defaults elevates like a normal run#10
codewiththiha merged 1 commit into
mainfrom
fix/save-defaults-elevates

Conversation

@codewiththiha

Copy link
Copy Markdown
Owner

scan/connect/all returned before require_root_for when --save-defaults was set, so a save-only run never elevated and failed writing settings.json with EACCES when the config dir needs sudo. Elevate before the save-defaults early return (same as a normal run), then persist and exit.

scan/connect/all called require_root_for after the --save-defaults early
return, so a save-only invocation never elevated and failed writing
settings.json with EACCES when the config dir needs sudo (e.g. left over
from a previous elevated run). Move require_root_for ahead of the
save-defaults block so it elevates first.
@codewiththiha
codewiththiha merged commit 7419195 into main Aug 4, 2026
1 check passed
@codewiththiha
codewiththiha deleted the fix/save-defaults-elevates branch August 4, 2026 08:16
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.

1 participant