core: fix npm dependency installation on Windows CI by disabling bin links when symlink permissions are restricted
This commit is contained in:
parent
4c57e39466
commit
85c2bb342b
1 changed files with 2 additions and 4 deletions
|
|
@ -52,7 +52,7 @@ export namespace Npm {
|
||||||
|
|
||||||
const arborist = new Arborist({
|
const arborist = new Arborist({
|
||||||
path: dir,
|
path: dir,
|
||||||
binLinks: true,
|
binLinks: !(process.platform === "win32" && process.env.CI),
|
||||||
progress: false,
|
progress: false,
|
||||||
savePrefix: "",
|
savePrefix: "",
|
||||||
})
|
})
|
||||||
|
|
@ -84,11 +84,9 @@ export namespace Npm {
|
||||||
|
|
||||||
export async function install(dir: string) {
|
export async function install(dir: string) {
|
||||||
log.info("installing dependencies", { dir })
|
log.info("installing dependencies", { dir })
|
||||||
// Disable binLinks on Windows CI where symlink permissions are restricted
|
|
||||||
const isWindowsCI = process.platform === "win32" && process.env.CI
|
|
||||||
const arb = new Arborist({
|
const arb = new Arborist({
|
||||||
path: dir,
|
path: dir,
|
||||||
binLinks: !isWindowsCI,
|
binLinks: !(process.platform === "win32" && process.env.CI),
|
||||||
progress: false,
|
progress: false,
|
||||||
savePrefix: "",
|
savePrefix: "",
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue