rez icon indicating copy to clipboard operation
rez copied to clipboard

`rez-build -h` fails if package.py build_system is invalid

Open hughetop opened this issue 3 years ago • 4 comments

Very small, minor, super low priority but trying to get the "help" for rez-build fails when you have an invalid build_system. But it's easy to just cd .. or something and then do it.

Environment

  • OS windows/mac/linux
  • Rez 2.111.2/2.111.3
  • Rez python version 3.9.13

To Reproduce

  1. create a new package
  2. add bogus build system like build_system = 'bogus'
  3. navigate to the package root and run rez-build -h

Expected behavior See the "help" for the rez-build command.

Actual behavior Error traceback rez.exceptions.RezPluginError: Unrecognised build system plugin: 'bogus'

hughetop avatar Oct 28 '22 20:10 hughetop

Hey @hughetop, tanks for e report. What would you expect instead an exception?

Just the normal "help" message. If I were trying to actually build the package, then the exception makes perfect sense. It's just odd for the -h or --help flags to fail this way.

hughetop avatar Oct 28 '22 22:10 hughetop

We have also run into this if the package.py file fails for some reason. Again, that probably shouldn't happen if all you are doing is asking for the help text.

czerouni avatar Mar 13 '25 21:03 czerouni

I agree. We would be happy to accept a PR that fixes this.