Skip to content

fix: remove usages of logger.out in CLI code #4959

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

Closed
wants to merge 1 commit into from

Conversation

rosen-vladimirov
Copy link
Contributor

logger.out has been removed before 6.0 release, but it has still been used in CLI's code. Remove its usages and add tests for errors.beginCommand (the one where the method has been used until now.

PR Checklist

What is the current behavior?

ANDROID_HOME=/invalid tns doctor - fails and in interactive terminal prompts you to select option. If you choose Manually configure, CLI will print error this.$injector.resolve(...).out is not a function (NOTE: In non-interactive terminal the same happens).

What is the new behavior?

ANDROID_HOME=/invalid tns doctor - fails and in interactive terminal prompts you to select option. If you choose Manually configure, CLI will prints where are the system requirements.

Fixes issue #4958

`logger.out` has been removed before 6.0 release, but it has still been used in CLI's code. Remove its usages and add tests for `errors.beginCommand` (the one where the method has been used until now.
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke cli-misc

assert.equal(processExitCode, errObj.errorCode, `When the action fails, process.exit must be called with ${errObj.errorCode}.`);
});

it("exits with default exit code code when the error has errorCode set to number", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the test name is wrong - it should be exits with default exit code code when the error has errorCode set to string

@rosen-vladimirov
Copy link
Contributor Author

Closing and will open new one to master branch

@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-doctor-err branch August 19, 2019 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant