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

Install the self-contained binary version of pnpm #31

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 6.17.1
os:
- ubuntu-latest
- macos-latest
Expand All @@ -27,10 +27,10 @@ jobs:
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 6.17.1

- name: 'Test: which'
run: which pnpm; which pnpx
run: which pnpm

- name: 'Test: install'
run: pnpm install
Expand All @@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 6.17.1
os:
- ubuntu-latest
- macos-latest
Expand All @@ -56,11 +56,11 @@ jobs:
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 6.17.1
dest: ~/test/pnpm

- name: 'Test: which'
run: which pnpm && which pnpx
run: which pnpm

- name: 'Test: install'
run: pnpm install
Expand All @@ -74,7 +74,7 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 6.17.1
os:
- ubuntu-latest
- macos-latest
Expand Down Expand Up @@ -112,11 +112,11 @@ jobs:
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 6.17.1
run_install: ${{ matrix.run_install.value }}

- name: 'Test: which'
run: which pnpm; which pnpx
run: which pnpm

- name: 'Test: install'
run: pnpm install
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/install-pnpm/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Inputs } from '../inputs'

export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const { version, dest } = inputs
const target = version ? `pnpm@${version}` : 'pnpm'
const target = version ? `@pnpm/exe@${version}` : '@pnpm/exe'
const pkgJson = path.join(dest, 'package.json')

await remove(dest)
Expand All @@ -20,7 +20,7 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
stdio: ['pipe', 'inherit', 'inherit'],
})

const response = await fetch('https://pnpm.io/pnpm.js')
const response = await fetch('https://get.pnpm.io/v6.16.js')
response.body.pipe(cp.stdin)

const exitCode = await new Promise<number>((resolve, reject) => {
Expand Down