FIX: Verify first word of _cmd in dependency check #1236
Merged
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
In the event that an
interface._cmd
has spaces in it - i.e., pre-set flags in addition to the command name - thewhich
check will fail. This PR uses_cmd.split()[0]
to use only the command up to the first space when checking for the command.A command of the form
python /some/path/some_script
will merely check the existence ofpython
, and not/some/path/some_script
, but that would not be correctly handled by the existing check. To my knowledge, we do not have any such nodes at this time, so this is theoretical, but we may want to consider a more robust long-term solution, but I don't believe that should hold up this fix.Fixes #1235.
Documentation that should be reviewed
None.
Pull-request guidelines:
finished (i.e. no
[WIP]
tag remains in the title of my PR) and tests pass.coding style,
to the extent I understood them (and I will address any comments raised by the PR's reviewers in this regard).
.zenodo.json
file.