From d4d7c4aee21f12080793adaa9f96da22569c930c Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Fri, 19 Nov 2021 18:36:43 +0200 Subject: [PATCH] fix(env): installing Node.js on Raspberry Pi 4 (#4008) close #4007 --- .changeset/odd-garlics-laugh.md | 6 ++++++ packages/plugin-commands-env/src/node.ts | 3 ++- packages/plugin-commands-env/src/normalizeArch.ts | 9 +++++++++ packages/plugin-commands-env/test/normalizeArch.test.ts | 9 +++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .changeset/odd-garlics-laugh.md create mode 100644 packages/plugin-commands-env/src/normalizeArch.ts create mode 100644 packages/plugin-commands-env/test/normalizeArch.test.ts diff --git a/.changeset/odd-garlics-laugh.md b/.changeset/odd-garlics-laugh.md new file mode 100644 index 0000000000..d7ecd10ad8 --- /dev/null +++ b/.changeset/odd-garlics-laugh.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-env": patch +"pnpm": patch +--- + +`pnpm env use` should download the right Node.js tarball on Raspberry Pi [#4007](https://github.com/pnpm/pnpm/issues/4007). diff --git a/packages/plugin-commands-env/src/node.ts b/packages/plugin-commands-env/src/node.ts index f3e406991a..975b71da19 100644 --- a/packages/plugin-commands-env/src/node.ts +++ b/packages/plugin-commands-env/src/node.ts @@ -11,6 +11,7 @@ import renameOverwrite from 'rename-overwrite' import tempy from 'tempy' import loadJsonFile from 'load-json-file' import writeJsonFile from 'write-json-file' +import normalizeArch from './normalizeArch' export type NvmNodeCommandOptions = Pick { + expect(normalizeArch(platform, arch)).toBe(normalizedArch) +})