lando / cli

The cli part of Lando
https://docs.lando.dev/cli
GNU General Public License v3.0
30 stars 33 forks source link

Crash handler does not respect --yes #242

Closed AaronFeledy closed 7 months ago

AaronFeledy commented 7 months ago

If an error occurs during lando setup -y the user is shown a CRASH message followed by a prompt asking if they'd like to send an error report. When running this as part of a scripted process, it may not be desirable, or even possible for the user to respond, potentially leading to a hung process. The error handler should respect the -y and it should not prompt the user.

AaronFeledy commented 7 months ago

Or if privacy might be a concern here, lando setup could disable the error reporting during non-interactive execution if the user has not yet had the opportunity to respond to this prompt.

pirog commented 7 months ago

@AaronFeledy in the setup-lando GitHub Action we manually write the needed file to do this. https://github.com/lando/setup-lando/blob/main/setup-lando.js#L154-L159

That said, i think this is a good addition and think it should more or less work like this:

  1. honor the -y flag as you indicate
  2. if the command is run non-interactively without -y then assume a "no" value for the crash report question so that it doesnt block
pirog commented 7 months ago

@AaronFeledy got a PR for this https://github.com/lando/cli/pull/247, let me know what you think