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

chore: Fix cross-platform preinstall script #87

Merged
merged 5 commits into from May 17, 2024
Merged

Conversation

lachlancollins
Copy link
Member

@lachlancollins lachlancollins commented May 13, 2024

I've noticed that the cross-platform preinstall script introduced to here (TanStack/query#4775), used across most tanstack projects, doesn't do what it's supposed to.

The intended (and original) behaviour is to only run only-allow on local dev, and skip on CI. The current script logs "Skipping preinstall..." on CI, but then throws a non-zero exit code. This causes the command after || to run, i.e. it runs only-allow on CI only. You can test this doesn't work locally by changing the last part of script to something like npx -y only-allow yarn.

This PR makes the non-zero code throw only when process.env.CI is not 'true', restoring the intended behaviour.

Copy link

nx-cloud bot commented May 13, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 333427b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@lachlancollins lachlancollins changed the title chore: Fix preinstall script chore: Fix cross-platform preinstall script May 13, 2024
@lachlancollins lachlancollins merged commit be1425f into main May 17, 2024
2 checks passed
@lachlancollins lachlancollins deleted the fix-preinstall branch May 17, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant