interrogate icon indicating copy to clipboard operation
interrogate copied to clipboard

-o, --output flag doesn't create output directory for log file if it doesn't exist already

Open GlenNicholls opened this issue 3 years ago • 0 comments

Environment

  • interrogate version(s): 1.5.0
  • Python version(s): 3.6-3.9

Description of the bug

When using the -o, --output flag, interrogate doesn't create the parent(s) of the file if they don't already exist:

$interrogate -vv -o build/coverage/docstring_coverage.log dir/
<traceback>
FileNotFoundError: [Errno 2] No such file or directory: 'build/coverage/docstring_coverage.log'

What you expected to happen

I would expect that interrogate would create the parent directories that do not exist (e.g. in this case build/coverage/.

GlenNicholls avatar Mar 23 '22 17:03 GlenNicholls