Skip to content

mrtrix3.run: Capturing help pages of external commands #1338

@Lestropie

Description

@Lestropie

I'm using run.command() to access the help page of non-MRtrix3 binaries, in order to parse the available command-line options of those binaries. Unfortunately, whether commands are executed with no additional command-line arguments, or explicitly specifying the relevant help command-line option, the commands return a non-zero exit code. While run.command() has an argument exitOnError which can prevent the whole script from failing when this occurs, it nevertheless produces a warning about failed execution of the command, which isn't ideal.

Either the mrtrix3.run module needs a separate convenience function specifically for this purpose, or run.command() needs to intelligently determine that it's the contents of a help page that are being requested, and not produce a warning about a non-zero return code.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions