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

fix(cli): display analytics disclaimer only in tty #3439

Merged
merged 3 commits into from
Jul 13, 2023
Merged

Conversation

hasanaburayyan
Copy link
Contributor

@hasanaburayyan hasanaburayyan commented Jul 13, 2023

This PR introduces 1 fix and 1 baby feature

  1. The fix is to ensure we only display disclaimer when there is a stdin terminal. This stops things like vs-code extension from altering the displayedDisclaimer value.
  2. The feature is to add a version to our config file for displayed disclaimer. This way if we need to update the disclaimer we can just tweak the WING_DISCLAIMER_VERSION variable and it will force display on the next run for the user.

Closes: #3405

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Monada Contribution License.

@hasanaburayyan hasanaburayyan requested a review from a team as a code owner July 13, 2023 17:52
@hasanaburayyan hasanaburayyan added the pr/backport backport from dev to main label Jul 13, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2023

Thank you for contributing! Your pull request will be updated from dev and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ac57c0c into dev Jul 13, 2023
@mergify mergify bot deleted the hasan/disclaimer-fix branch July 13, 2023 18:42
mergify bot pushed a commit that referenced this pull request Jul 13, 2023
This PR introduces 1 fix and 1 baby feature

1. The fix is to ensure we only display disclaimer when there is a stdin terminal. This stops things like vs-code extension from altering the `displayedDisclaimer` value.
2. The feature is to add a version to our config file for displayed disclaimer. This way if we need to update the disclaimer we can just tweak the `WING_DISCLAIMER_VERSION` variable and it will force display on the next run for the user.

Closes: #3405

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [x] Tests added (always)
- [x] Docs updated (only required for features)
- [x] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://www.winglang.io/terms-and-policies/contribution-license.html)*.

(cherry picked from commit ac57c0c)
hasanaburayyan added a commit that referenced this pull request Jul 13, 2023
…3441)

Co-authored-by: Hasan <45375125+hasanaburayyan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/backport backport from dev to main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-release and analytics disclaimer is not printed to the user's standard output
2 participants