Skip to content

CommandLine: not well-handle all input parameters #2645

@ZDu-IDM

Description

@ZDu-IDM
def __init__(self, executable=None, *args, is_windows: bool = False, raw_args: List[Any] = None, **kwargs):

Consider the case:

cmd_str = "singularity exec Assets/my_sif.sif Assets/my_executable --config my_config.json"
command = CommandLine(cmd_str, '--dll-path',  './Assets', raw_args=['--input-path', './Assets\;.'])
command.add_option("--python-script-path", 'dtk_post_process.pyn;dtk_pre_process.py')

and

cmd_str = "singularity exec Assets/my_sif.sif Assets/my_executable"
command = CommandLine(cmd_str, '--dll-path',  './Assets', raw_args=['--input-path', './Assets\;.'], kwargs={"--config":"my_config.json"})
command.add_option("--python-script-path", 'dtk_post_process.pyn;dtk_pre_process.py')

Check result:
print(command.cmd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions