Skip to content
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

fix: only set extraEnv for preferSymlinkedExecutables if it's not windows #5256

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: only set extraEnv for preferSymlinkedExecutables if it's not win…
…dows
d3lm committed Aug 24, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ac935f4af7ada399ba4ce6549337b7c725759cef
5 changes: 5 additions & 0 deletions .changeset/quiet-cameras-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pnpm/config": patch
---

Only set extraEnv for preferSymlinkedExecutables if it's not windows.
2 changes: 2 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@
"camelcase": "^6.3.0",
"can-write-to-dir": "^1.1.1",
"is-subdir": "^1.2.0",
"is-windows": "^1.0.2",
"normalize-registry-url": "2.0.0",
"path-absolute": "^1.0.1",
"path-name": "^1.0.0",
@@ -53,6 +54,7 @@
"devDependencies": {
"@pnpm/config": "workspace:*",
"@pnpm/prepare": "workspace:*",
"@types/is-windows": "^1.0.0",
"@types/ramda": "0.28.15",
"@types/which": "^2.0.1",
"symlink-dir": "^5.0.1"
3 changes: 2 additions & 1 deletion packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import { safeReadProjectManifestOnly } from '@pnpm/read-project-manifest'
import { getCurrentBranch } from '@pnpm/git-utils'
import matcher from '@pnpm/matcher'
import camelcase from 'camelcase'
import isWindows from 'is-windows'
import normalizeRegistryUrl from 'normalize-registry-url'
import fromPairs from 'ramda/src/fromPairs'
import realpathMissing from 'realpath-missing'
@@ -404,7 +405,7 @@ export default async (
pnpmConfig.extraBinPaths = []
}

if (pnpmConfig.preferSymlinkedExecutables) {
if (pnpmConfig.preferSymlinkedExecutables && !isWindows()) {
const cwd = pnpmConfig.lockfileDir ?? pnpmConfig.dir

const virtualStoreDir = pnpmConfig.virtualStoreDir
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

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