buildkite / agent

The Buildkite Agent is an open-source toolkit written in Go for securely running build jobs on any device or network
https://buildkite.com/
MIT License
812 stars 301 forks source link

Improve error message for 'fatal: missing job' in meta-data command #923

Open harrietgrace opened 5 years ago

harrietgrace commented 5 years ago

Hey @lox! This one was reported in https://github.com/buildkite/docs/issues/243 last year, and you mentioned that you wanted to improve the error message 😊

Currently (As of may last year, unless it's been updated) if you don't set the job flag, you get the error:

FATAL Missing job. See: buildkite-agent meta-data set --help

toolmantim commented 5 years ago

Just to add some more context, I believe the original confusion was trying to run the command from outside a job altogether, just on the command line.

It might be nice to provide a friendlier experience, and improved --help output, for people trying to run it accidentally outside of a job.

lox commented 5 years ago

Agree that it's a horrible error message! I remember it confusing me as a user.