Skip to content

Commit 5c75aa2

Browse files
ci: use --no-save for matrix electron install
npm install defaults to --save, which rewrites package.json with the matrix electron version. That leaves yarn.lock stale, and yarn 4 checks lockfile consistency on every invocation — including yarn tsx in the spec runner. --no-save installs to node_modules without touching package.json. Reverts the previous npx --no workaround.
1 parent 1215b0c commit 5c75aa2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install dependencies
5555
run: yarn install --immutable
5656
- name: Install Electron
57-
run: npm install "electron@${{ matrix.electron-version }}"
57+
run: npm install --no-save "electron@${{ matrix.electron-version }}"
5858
- name: Lint
5959
run: npm run lint
6060
- name: Build

spec-electron-setup/scripts/mocha-cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Electron Spec Runner', function () {
1616

1717
it('should complete Electron tests successfully', (done) => {
1818
const runnerPath = path.resolve(__dirname, './spec-runner.ts');
19-
const child = spawn('npx', ['--no', 'tsx', `"${runnerPath}"`], { stdio: 'inherit', shell: true });
19+
const child = spawn('yarn', ['tsx', `"${runnerPath}"`], { stdio: 'inherit', shell: true });
2020

2121
child.on('close', (code) => {
2222
expect(code).to.equal(0, 'Electron exited with non-zero status');

0 commit comments

Comments
 (0)