-
Notifications
You must be signed in to change notification settings - Fork 191
Show a nice error message if user is running node <20 #6138
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
base: main
Are you sure you want to change the base?
Conversation
575d9b1
to
609892b
Compare
609892b
to
faab565
Compare
faab565
to
6c333a5
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success3046 tests passing in 1314 suites. Report generated by 🧪jest coverage report action from 6c333a5 |
headline: 'Update to Node 20 or higher to run `shopify store copy`.', | ||
body: [`The \`store copy\` command requires Node 20 or higher. Current Node version: ${nodeMajorVersion}.`], | ||
}) | ||
process.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to avoid using process.exit
and instead throw an error, that will be tracked.
Also, in cli-kit
we have the exitIfOldNodeVersion
already. It's currently checking for node <18, but maybe we can upgrade it to <20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the existing exitIfOldNodeVersion
. For anything related to the system/environment/paths/filesystem, always check if there is a solution already in cli-kit (that's the goal, to have generic solutions for this kind of stuff)
Great feedback thanks!! Will adjust :) |
WHY are these changes introduced?
https://github.com/Shopify/workflows-operations/issues/3367
WHAT is this pull request doing?
Show a nice error if user is running node version <20.
How to test your changes?