chore: add sudo trust prompt before managed settings write#96
Merged
Conversation
added 2 commits
March 9, 2026 00:37
Surface the sudo requirement earlier in init with a clear explanation, verification prompt, and explicit fallback option. Remove the redundant inner sudo confirm from installManagedSettings().
3 tasks
dean0x
added a commit
that referenced
this pull request
Mar 9, 2026
## Summary - Add 6 unit tests for `installManagedSettings()` covering all testable code paths (unsupported platform, template read failure, direct write, merge with existing settings, EACCES non-TTY, non-EACCES errors) - Update CHANGELOG `[Unreleased]` with sudo trust prompt (#96) and test coverage entries ## Test plan - [x] `npm test` — all 191 tests pass (was 185) - [x] No regressions in existing tests - [x] Build passes Co-authored-by: Dean Sharon <deanshrn@gmain.com>
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.
Summary
devflow initwith ap.note()explaining what managed settings does, why sudo is needed, and a copy-pasteable verification prompt for another Claude Code sessionp.select()with explicit "Yes, continue" / "No, fall back to settings.json" options before any sudo prompt appearsp.confirm("Use sudo?")frominstallManagedSettings()to avoid double-promptingTest plan
npm run build && npm test— all tests passnode dist/cli.js init→ choose User scope → choose Managed settings → verify the note + select prompt appears before any sudo prompt