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 518d4a2 commit c8445ce
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 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 v6.32.21.
2 changes: 1 addition & 1 deletion packages/config/package.json
Expand Up @@ -35,7 +35,7 @@
"@pnpm/constants": "workspace:5.0.0",
"@pnpm/error": "workspace:2.1.0",
"@pnpm/global-bin-dir": "workspace:3.0.1",
"@pnpm/npm-conf": "1.0.3",
"@pnpm/npm-conf": "1.0.4",
"@pnpm/pnpmfile": "workspace:1.2.6",
"@pnpm/read-project-manifest": "workspace:2.0.13",
"@pnpm/types": "workspace:7.10.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 @@ -793,3 +793,17 @@ test('getConfig() sets sideEffectsCacheRead and sideEffectsCacheWrite when side-
expect(config.sideEffectsCacheRead).toBeTruthy()
expect(config.sideEffectsCacheWrite).toBeFalsy()
})

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')
})
8 changes: 4 additions & 4 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 c8445ce

Please sign in to comment.