Skip to content

Commit

Permalink
fix: don't fail when cafile is set
Browse files Browse the repository at this point in the history
close #4877
  • Loading branch information
zkochan committed Jun 11, 2022
1 parent f7390f5 commit 25798aa
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/tough-coats-battle.md
@@ -0,0 +1,6 @@
---
"@pnpm/config": patch
"pnpm": patch
---

Don't fail when the cafile setting is specified [#4877](https://github.com/pnpm/pnpm/issues/4877). This fixes a regression introduced in pnpm v7.2.0.
2 changes: 1 addition & 1 deletion packages/config/package.json
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@pnpm/constants": "workspace:6.1.0",
"@pnpm/error": "workspace:3.0.1",
"@pnpm/npm-conf": "1.0.3",
"@pnpm/npm-conf": "1.0.4",
"@pnpm/pnpmfile": "workspace:2.0.3",
"@pnpm/read-project-manifest": "workspace:3.0.3",
"@pnpm/types": "workspace:8.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/config/test/cafile.txt
@@ -0,0 +1 @@
xxx
14 changes: 14 additions & 0 deletions packages/config/test/index.ts
Expand Up @@ -790,3 +790,17 @@ test('getConfig() sets sideEffectsCacheRead and sideEffectsCacheWrite when side-
expect(config.sideEffectsCacheRead).toBeTruthy()
expect(config.sideEffectsCacheWrite).toBeTruthy()
})

test('getConfig() should read cafile', async () => {
const { config } = await getConfig({
cliOptions: {
cafile: path.join(__dirname, 'cafile.txt'),
},
packageManager: {
name: 'pnpm',
version: '1.0.0',
},
})
expect(config).toBeDefined()
expect(config.ca).toBe('xxx')
})
13 changes: 11 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25798aa

Please sign in to comment.