Open umarcor opened 3 years ago
Options/arguments for the CLI in pyHDLC are declared using pyAttributes. Option -n|--noexec is defined for Run as it is expected to be available for all (sub)commands. However, it does not work if placed after them. That is, the following does work:
-n|--noexec
Run
# ./pyHDLC/cli.py -n build sim · docker build --progress=plain --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg REGISTRY=ghcr.io/hdl/debian-buster -t ghcr.io/hdl/debian-buster/sim -f debian-buster/sim.dockerfile .
but the following fails:
# ./pyHDLC/cli.py build -n sim usage: cli.py [-n] [-p] [-d] {help,build,push,pull} ... cli.py: error: unrecognized arguments: -n
It would be desirable if -n was inherited by build and both orders were accepted.
-n
build
Similar to how GHDL behaves, that's the behavior of Pythons ArgParse. pyAttributes is a wrapper for ArgParse, so the behavior is inherited.
ArgParse
pyAttributes
Anyhow, the described behavior would be nice.
Options/arguments for the CLI in pyHDLC are declared using pyAttributes. Option
-n|--noexec
is defined forRun
as it is expected to be available for all (sub)commands. However, it does not work if placed after them. That is, the following does work:but the following fails:
It would be desirable if
-n
was inherited bybuild
and both orders were accepted.