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

feat: Add dangerous mode to avoid node version check #84

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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.
const options = { sortBy, limit, reverse, minimal, chart, log };

(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.

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?

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