Skip to content

fix(analytics): undefined file is created on every command #4177

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

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

When analytics are enabled, undefined file is created at the location where a command is executed. This is because the $options.analyticsLoggingFile is undefined, but we've set it as args to the spawned Analytics process. The value in the child process is the string "undefined", so that's why CLI always creates this file.
Pass the path to file only when it is passed by user.

PR Checklist

What is the current behavior?

When analytics are enabled, CLI always produces file called undefined, in which it saves the information what has been tracked.

What is the new behavior?

When analytics are enabled, CLI will produce file with name specified by user with --analyticsLogFile <name>, in which it saves the information what has been tracked.

Part of the implementation of: #4152

When analytics are enabled, `undefined` file is created at the location where a command is executed. This is because the `$options.analyticsLoggingFile` is undefined, but we've set it as args to the spawned Analytics process. The value in the child process is the string "undefined", so that's why CLI always creates this file.
Pass the path to file only when it is passed by user.
@rosen-vladimirov rosen-vladimirov added this to the 5.1.0 milestone Nov 27, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Nov 27, 2018
@rosen-vladimirov rosen-vladimirov merged commit db8b2d4 into master Nov 27, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-analytics-logging branch November 27, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants