-
Notifications
You must be signed in to change notification settings - Fork 119
fix(ncu-config): support encrypted config in ncu-config #964
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
This otherwise always re-write the config into ~/.ncurc instead of ~/.ncurc.gpg
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #964 +/- ##
==========================================
- Coverage 80.06% 79.75% -0.31%
==========================================
Files 39 39
Lines 4645 4663 +18
==========================================
Hits 3719 3719
- Misses 926 944 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
const configPath = getConfigPath(configType, dir); | ||
const encryptedConfigPath = configPath + '.gpg'; | ||
if (existsSync(encryptedConfigPath)) { | ||
const tmpDir = mkdtempSync(path.join(os.tmpdir(), 'ncurc-')); |
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.
Could we use stdin instead of a temp dir?
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.
From local testing, this does not quite work if pinentry program is not using stdin for input (e.g. if it's a GUI dialog).
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.
lgtm
This otherwise always re-write the config into ~/.ncurc instead of ~/.ncurc.gpg
Refs: #615