Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution error if unchecking "generate raw" option #16

Open
jrasero opened this issue Mar 26, 2020 · 1 comment
Open

Execution error if unchecking "generate raw" option #16

jrasero opened this issue Mar 26, 2020 · 1 comment

Comments

@jrasero
Copy link

jrasero commented Mar 26, 2020

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.

@jrasero jrasero changed the title Error if checking not generate Raw data Error if checking not generate raw data Mar 26, 2020
@jrasero jrasero changed the title Error if checking not generate raw data Execution error if unchecking "generate raw" option Mar 26, 2020
@dpark6060
Copy link
Contributor

Makes sense. Thanks for the catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants