Skip to content

fix: save and remove of user-settings are not working #4994

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
Aug 30, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

Due to recent changes, trying to save a setting in the user-settings.json or to remove it from there is not working. This breaks all new users and the execution of commands like tns usage-reporting enable/disable, tns error-reporting enable/disable.
The problem is an infinite recursion in the userSettingsService, which should just call jsonFileSettingsService, but instead it calls itself.
Fix the recursion and add unit tests for the userSettingsService to ensure it acts as a proxy to jsonFileSettingsService.

PR Checklist

What is the current behavior?

tns error-reporting enable && tns error-reporting disable are not working. New users are unable to use CLI.
tns <any command> --profileDir <some dir> is not working (this is the same what happens for new users.

What is the new behavior?

tns error-reporting enable && tns error-reporting disable are working. New users are unable to use CLI.
tns <any command> --profileDir <some dir> is working (this is the same what happens for new users.

Fixes/Implements/Closes #[Issue Number].

Due to recent changes, trying to save a setting in the user-settings.json or to remove it from there is not working. This breaks all new users and the execution of commands like `tns usage-reporting enable/disable`, `tns error-reporting enable/disable`.
The problem is an infinite recursion in the userSettingsService, which should just call jsonFileSettingsService, but instead it calls itself.
Fix the recursion and add unit tests for the userSettingsService to ensure it acts as a proxy to jsonFileSettingsService.
@rosen-vladimirov rosen-vladimirov added this to the 6.1.0 milestone Aug 30, 2019
@rosen-vladimirov rosen-vladimirov self-assigned this Aug 30, 2019
@cla-bot cla-bot bot added the cla: yes label Aug 30, 2019
@rosen-vladimirov
Copy link
Contributor Author

test cli-misc

@rosen-vladimirov rosen-vladimirov merged commit 5854ed8 into master Aug 30, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-user-settings branch August 30, 2019 06:29
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.

2 participants