Skip to content

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Aug 8, 2025

This otherwise always re-write the config into ~/.ncurc instead of ~/.ncurc.gpg
Refs: #615

This otherwise always re-write the config into ~/.ncurc instead of
~/.ncurc.gpg
@joyeecheung joyeecheung requested a review from aduh95 August 8, 2025 22:46
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.75%. Comparing base (ba44c74) to head (b98e56d).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/config.js 4.54% 21 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const configPath = getConfigPath(configType, dir);
const encryptedConfigPath = configPath + '.gpg';
if (existsSync(encryptedConfigPath)) {
const tmpDir = mkdtempSync(path.join(os.tmpdir(), 'ncurc-'));
Copy link
Contributor

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?

Copy link
Member Author

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).

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joyeecheung joyeecheung merged commit c6cfc55 into nodejs:main Sep 17, 2025
11 of 13 checks passed
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.

6 participants