flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

flux-run: poor error message on bad input

Open chu11 opened this issue 9 months ago • 1 comments

Recently had a typo in a test script that took me awhile to chase down.

>flux run --dry-run --setattr=exec.test.run_duration=0.1s "hostname"

works of course, but I screwed up quoting and accidentally did

>flux run --dry-run "--setattr=exec.test.run_duration=0.1s hostname" 
flux-run: ERROR: job command and arguments are missing

obviously job command isn't missing. I assume some parsing issue somewhere leading to this less than helpful error message

chu11 avatar Feb 14 '25 18:02 chu11

My guess is you're quoting of the entire --setattr option caused argparse to treat exec.test.run_duration=0.1s hostname as its entire argument, thus there was no "remainder" to represent the command and arguments.

I'm not sure we'll be able to fix this one.

grondo avatar Feb 14 '25 18:02 grondo