Skip to content

Conversation

sampathBlam
Copy link

  • Add a new flag --dangerous / -d
  • If the flag is present, corona-cli avoids node js version check
  • Removed the minimal param for init function in index.js as it was not used
  • Added .vscode to gitignore
  • Added content for -d in help section.
  • Addresses Support for node.js versions below 12 #83

- Add a new flag --dangerous / -d
- If the flag is present, corona-cli avoids node js version check
- Removed the minimal param for init function in index.js as it was not used
- Added .vscode to gitignore
- Added content for -d in help section.
(async () => {
// Init.
init(minimal);
init(dangerous);
Copy link
Owner

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.

Copy link
Author

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 the init module at all. That is the reason I removed it from the call.

module.exports = async dangerous => {
unhandledError();
checkNode(`10`);
if (!dangerous) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't handle the case when dangerous-version flag is set.

Copy link
Author

Choose a reason for hiding this comment

The 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 is called only if dangerous flag is not set. If dangerous is set, it will not go inside the if block at all. Does it make sense?

@sampathBlam sampathBlam requested a review from ahmadawais April 18, 2020 09:30
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.

2 participants