这是indexloc提供的服务,不要输入任何密码
Skip to content

Update postinstall script to use optionalDependencies #405

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

Merged
merged 5 commits into from
Dec 22, 2021
Merged
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
1 change: 1 addition & 0 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ platform-linux-ppc64le:

platform-neutral: | turbo
cd npm/turbo-install && npm version "$(TURBO_VERSION)" --allow-same-version
node ./scripts/bump-version.js

platform-create-turbo:
cd ../create-turbo && npm version "$(TURBO_VERSION)" --allow-same-version && npm run build
Expand Down
18 changes: 8 additions & 10 deletions cli/npm/turbo-install/bin/turbo
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/usr/bin/env node
throw new Error(`turbo: Failed to install correctly
Make sure you don't have "ignore-scripts" set to true. You can check this with
"npm config get ignore-scripts". If that returns true you can reset it back to
false using "npm config set ignore-scripts false" and then reinstall esbuild.
If you're using npm v7, make sure your package-lock.json file contains either
"lockfileVersion": 1 or the code "hasInstallScript": true. If it doesn't have
either of those, then it is likely the case that a known bug in npm v7 has
corrupted your package-lock.json file. Regenerating your package-lock.json file
should fix this issue.
`)

const { generateBinPath } = require("../node-platform");

require("child_process").execFileSync(
generateBinPath(),
process.argv.slice(2),
{ stdio: "inherit" }
);
Loading