hpcugent / vsc-base

Basic Python libraries used by UGent's HPC group
Other
14 stars 51 forks source link

vsc.utils.run:run behaves weirdly when command contains empty string #304

Closed MatthiasCoppens closed 4 years ago

MatthiasCoppens commented 4 years ago

When running a command that's a list that contains an empty string, run appears to cut off the command at the empty string. I'd expect run(command) to do the same as run([word for word in command if word]).

stdweird commented 4 years ago

empty string is passed as empty arg, nothing else what were you running?

boegel commented 4 years ago

@stdweird The value of the --pass option was blindly being added to the backend command in jobcli (that's being fixed in https://github.com/hpcugent/jobcli/pull/157).

I told @MatthiasCoppens to open an issue here too on this though, since we should probably disallow empty string values being passed in the list to run?

stdweird commented 4 years ago

why would we not allow that? empty args do occur and typically have meaning.

boegel commented 4 years ago

Right, ok. In this case it was a bug in jobcli then, so closing.