-
Notifications
You must be signed in to change notification settings - Fork 237
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
App hangs on first run if run non-interactively #695
Comments
One alternative would be to remove the tracking if we find it has served it's purpose, for example there's nothing more we can learn. |
@zuzak it seems sensible to default this to off if we know for sure the application is run by the user. I think we would accept a pull request for what you've described here if it were also tested :) Let me know if you need any help doing that. We can also pick this up when we get some time in the future. |
You can run the prototype toolkit in a way that does not accept input. A basic example would be: $ npm start | cat If this is the first time you have run the prototype kit, the application will hang as there is no way to respond to the question about recording usage data. This means it is difficult to run the prototype kit solely without user input. This commit changes the behaviour of that prompt to only appear if the user is running the command in a TTY context. If the user is not running the prototype kit in a TTY, the prompt will be skipped and the default action will occur as if the user had simply hit return. In this case, it'll default to "no" and opt the user out of usage data collection automatically. A downside of this approach is that the user will not get asked again if they subsequently run the kit interactively. However, it is unlikely that users will wish to run the prototype kit initially within a pipeline whilst also wishing to run it interactively at a later date. Closes alphagov#695. Another prompt occurs when the chosen port is in use, but this commit doesn't attempt to edit that.
You can run the prototype toolkit in a way that does not accept input. A basic example would be: $ npm start | cat If this is the first time you have run the prototype kit, the application will hang as there is no way to respond to the question about recording usage data. This means it is difficult to run the prototype kit solely without user input. This commit changes the behaviour of that prompt to only appear if the user is running the command in a TTY context. If the user is not running the prototype kit in a TTY, the prompt will be skipped and the default action will occur as if the user had simply hit return. In this case, it'll default to "no" and opt the user out of usage data collection automatically. A downside of this approach is that the user will not get asked again if they subsequently run the kit interactively. However, it is unlikely that users will wish to run the prototype kit initially within a pipeline whilst also wishing to run it interactively at a later date. Closes alphagov#695. Another prompt occurs when the chosen port is in use, but this commit doesn't attempt to edit that.
At the moment, if you run the prototype kit for the first time in an non-interactive way (say, as part of a Unix pipeline, or deployed into Kubernetes), the app will hang waiting for user input to opt into sharing usage data.
Perhaps we should default to "no" when this happens? For example:
The text was updated successfully, but these errors were encountered: