SandboxBwrap incorrectly checks its arguments type for command

Summary

Relevant code: https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/sandbox/_sandboxbwrap.py#L69-76

The conversion from string to list for the command happens after we checked that the command exist. That means that any command that is a string will be always invalid.

I suggest that we remove this conversion and require a list. This is what the current behavior is doing de-facto anyways.

What is the current bug behavior?

The conversion from string to list for the command happens after we checked that the command exist. That means that any command that is a string will be always invalid.

Possible fixes

  • we should do the check after the conversion
  • we could remove the conversion entirely (I'm in favor of this)