-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
feat: Add dangerous mode to avoid node version check #84
base: master
Are you sure you want to change the base?
Changes from all commits
d86a25f
982383d
8a08ea4
4a3f562
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,6 @@ assets/img/.DS_Store | |
package-lock.json | ||
yarn.lock | ||
settings.dat | ||
|
||
# Visual Studio Code debug files | ||
.vscode/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,13 @@ const pkgJSON = require('./../package.json'); | |
const updateNotifier = require('update-notifier'); | ||
const unhandledError = require('cli-handle-unhandled'); | ||
|
||
module.exports = async () => { | ||
const MINIMUM_NODE_JS_VERSION = '10'; | ||
|
||
module.exports = async dangerous => { | ||
unhandledError(); | ||
checkNode(`10`); | ||
if (!dangerous) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You didn't handle the case when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ahmadawais : By default, dangerous is false. I have added the logic in such a way that |
||
checkNode(MINIMUM_NODE_JS_VERSION); | ||
} | ||
welcome(`corona-cli`, `by Awais.dev\n${pkgJSON.description}`, { | ||
bgColor: `#007C91`, | ||
color: `#FFFFFF`, | ||
|
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.
This is wrong. You remove minimal option all together.
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.
@ahmadawais : Sorry I did not get you.
minimal
option is not used inside theinit
module at all. That is the reason I removed it from the call.