Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Execution error if unchecking "generate raw" option #16

@jrasero

Description

@jrasero

Hi,

Running this gear unchecking the option to keep the raw log data gives an error at the end of execution. It basically says the following:

Exception: /bin/rm: cannot remove '/flywheel/v0/output': Is a directory
/bin/rm: cannot remove '*.log': No such file or directory

I think it might be caused by a bug in the code that removes the created log files:

if not gear_context.config['Generate_Raw']:
                gear_context.log.info('Removing .log files')
                cmd = ['/bin/rm', output_dir, '*.log']

                exec_command(gear_context, cmd)

which executes the following code in the terminal:

/bin/rm path/to/output_dir *.log

As you can see, there shouldn't be a space between the path to the output directory and the log files.

I guess it could be just fixed joining the last two parts of cmd as follows:

if not gear_context.config['Generate_Raw']:
                gear_context.log.info('Removing .log files')
                cmd = ['/bin/rm', op.join(output_dir, '*.log')]

                exec_command(gear_context, cmd)

Please, let me know if this makes sense or not.

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