xenon-middleware / xenon-cli

Perform files and jobs operations with Xenon library from command line
http://nlesc.github.io/Xenon/
Apache License 2.0
2 stars 3 forks source link

Submit jobs using the local adaptor #75

Closed arnikz closed 4 years ago

arnikz commented 4 years ago

For example:

$ xenon --version
Xenon CLI v3.0.5, Xenon library v3.1.0, Xenon cloud library v3.0.2

$ xenon scheduler local exec ls  # OK

$ xenon scheduler local exec ls /path  # OK

$ xenon scheduler local exec ls -l
....
xenon: error: unrecognized arguments: '-l'

$ xenon scheduler local exec "ls -l"
local adaptor: Interactive job failed to start!

It seems that one can't pass command args starting with -/--.

sverhoeven commented 4 years ago

This is a known problem the workaround is described in xenon scheduler local exec --help as

Arguments for executable, prepend ' -- ' when arguments start with '-'

Or see the arg parse manual

So the following command works:

xenon scheduler local exec ls -- -l