genuinetools/img

Some flags are only respecting aliases

kneal opened this issue ยท 1 comments

kneal commented

Hey All,

Recently started using this tool within a Docker image:
FROM r.j3ss.co/img:v0.5.10

I have a tool that is calling the binary via a Go application and I noticed some differing behavior with a few flags. Specifically, the -f, --file and -t, --tag. What I am noticing is the full version of the flag does not seem to work but the alias works for the flags.

CLI info within image:

$ /usr/bin/img version
img:
 version     : v0.5.10
 git hash    : 38b683a6
 go version  : go1.13.15
 go compiler : gc
 platform    : linux/amd64
runc:
 version     : 1.0.0-rc10+dev
 commit      : 56aca5aa50d07548d5db8fd33e9dc562f70f3208
 spec        : 1.0.2

Details for -f, --file flag:

# Broken file flag usage
$ /usr/bin/img build --file "Dockerfile.example" .
Error: unknown flag: --file "Dockerfile.example"


# Good file flag usage
$ /usr/bin/img build -f "Dockerfile.example" .

Details for -t, --tag flag:

# Broken file flag usage
$ /usr/bin/img build --file "Dockerfile.example" .
Error: unknown flag: --file "Dockerfile.example"

# Good file flag usage
/usr/bin/img build -f "Dockerfile.example" --tag "<image_name>:<tag>" .
Error: unknown flag: --tag "<image_name>:<tag>"

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.72. Please mark this comment with ๐Ÿ‘ or ๐Ÿ‘Ž to give our bot feedback!

Links: app homepage, dashboard and code for this bot.