Closed marcodelapierre closed 3 years ago
Hi @marcodelapierre, thanks for the report. I looked into the issue and I can confirm the detection of option values separated by whitespace is not working as intended. We are currently working on fixing this.
In the meantime, you could use the "adjacent" style, i.e. providing the value in the same token as the option. I verified this works with both long and short options in Sarus 1.1.0:
# long option: '=' works as separator
amadonna@localhost:~> sarus run --workdir=/home alpine pwd
/home
# short option: value starts right after the option character
amadonna@localhost:~> sarus run -w/home alpine pwd
/home
Cheers Alberto, to be honest I hadn't tried the adjacent style, I can confirm it works beautifully
Hi @marcodelapierre, as of version 1.3.0 Sarus correctly detects CLI option values separated by whitespace:
# workdir from image
amadonna@localhost:~> srun -C gpu sarus run ubuntu pwd
/
# change workdir using long option and value separated by whitespace
amadonna@localhost:~> sarus run --workdir /home ubuntu pwd
/home
# change workdir using short option and value separated by whitespace
amadonna@localhost:~> sarus run -w /home ubuntu pwd
/home
thanks for the update Alberto!
Virtual machine with Ubuntu 18.04
Sarus installed as per https://sarus.readthedocs.io/en/stable/quickstart/quickstart.html
Here is what happens: