-
Notifications
You must be signed in to change notification settings - Fork 196
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: Collect usage statistic showing twice #328
Comments
Hi @wolfenrain 👋 Are you able to provide more context regarding what OS you're running on? Also, can you confirm that other commands only execute once? The reason I ask is because there have been similar issues reported like leoafarias/fvm#227 and #121. |
The command itself ran only once, it also only happened after I gave an answer. I am currently running it on Linux, pop-os 21.10 |
So I managed to reproduce this inside a Docker container, while that obviously does not fully reflect any working environment the problem itself is consistent on my Linux machine so I suspect this is a Linux + Bash problem? Might still be a problem specific to the terminal emulator that is being used, can't test that right now.
|
This is no longer uncertain, I have followed these steps on my intel macbook and got exactly the same results. So either the stdout writing is going haywire (based on a quick assessment of the code for this I would assume that it is not the case) or the CLI and Bash/Linux aren't the greatest friends (yet). |
Based on this method I wrote up a simple test file to see if the problem is reproducible in a simplere case. The test I wrote up ran in a Docker VM on Dart 2.16.1, I initially just used the stdout and stdin from import 'dart:io';
void main() {
const message = 'testing this';
stdout.write(message);
stdin.readLineSync()?.trim();
stdout.writeln('\x1b[A\u001B[2K$message with result');
} This does not result in the problem describe above. So I took a quick look at the universal_io, expected it to just reexport So considering that it is working without universal_io as expected I suspect the problem might lie somewhere in their implementation. |
Hmm that's interesting! Thanks for looking into it. Are you planning to try swapping out |
Yes I already tried, but it was throwing some |
The bug is in I put a PR for that, so after that is merged and released we can resolve this issue by just upgrading. |
This should be resolved now. Developers should be able to just re-activate |
Description
When running the
very_good_cli
for the first time it asks if it can collect usage statistics. If you sayy
es then it will output the exact message once more.Steps To Reproduce
very_good_cli
from clean (tested it with v0.6.0)very_good create
commandy
es.Expected Behavior
That it will only show the message asking to collect data once, before answering and not again after answering the question.
Screenshots
Additional Context
I did run it on dart version
2.15.1
by accident but I was able to reproduce it after updating and clean installing the tool.The text was updated successfully, but these errors were encountered: