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

How to disable/ignore update warning when calling Lando from scripts? #1000

Closed
dsnopek opened this Issue May 28, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@dsnopek
Copy link

dsnopek commented May 28, 2018

So, we have a bunch of scripts that call lando and parse it's output, for example:

  • lando info
  • lando drush pm-list --format=json

However, when there's a new Lando update available, the update message gets put before the JSON and breaks parsing.

Is there a way to disable the warning entirely when running from a script? Or, if the message was output on stderr, then it could still be shown, but the stdout will be clean, parseable JSON.

Just encoutered this again because there was just a release a little bit ago :-)

@dustinleblanc

This comment has been minimized.

Copy link
Member

dustinleblanc commented May 29, 2018

@dsnopek at this point, nope, we don't have a way to disable this message without updating the project. Your use case is yet another indication that we need to look at cleaning up the output in some way though 🤔

I think the problem with pushing to stderr might be that CI processes etc might fail if there is output in stderr? I might be wrong on that.

@dsnopek

This comment has been minimized.

Copy link
Author

dsnopek commented May 29, 2018

I'm not aware of a CI platform that fails just because there's something output on stderr, most usually look at the exit code, but if there was such a CI platform you could just redirect stderr somewhere, for example:

lando info 2>/dev/null
@dustinleblanc

This comment has been minimized.

Copy link
Member

dustinleblanc commented May 29, 2018

You're probably right, my fear was likely unneeded 😆

I like the idea of dumping it to stderr as a way of seperating the output but pretty much always making sure it shows up (the main reason there really isn't a way to turn it off).

@pirog

This comment has been minimized.

Copy link
Member

pirog commented Jan 23, 2019

This has been changed in forthcoming RC2. The update warning will now be sent to stderr

@pirog pirog closed this Jan 23, 2019

pirog added a commit that referenced this issue Jan 23, 2019

@dsnopek

This comment has been minimized.

Copy link
Author

dsnopek commented Jan 23, 2019

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment