You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't able to find a previously submitted issue surrounding this, apologies if I missed it.
Ruff fails (exit code 2) when trying to write to an output file (via --output-file) within a directory that doesn't exist with the following message:
ruff failed
Cause: No such file or directory (os error 2)
I'd like to see Ruff automatically create the necessary directories to house the output file if they don't already exist rather than have to ensure the directory exists before invoking Ruff; or have Ruff have an option to automatically create the directories.
Reproducing the issue is fairly simple. Setting the --output-file flag to a filesystem location whose directories don't exist should do the trick (e.g. ruff check --isolated --output-file /tmp/does/not/exist/output.txt). This was tested on the latest Ruff (0.4.5). Creating the necessary directories (i.e. mkdir -p /tmp/does/not/exist) and then rerunning the command allows Ruff to succeed.
The text was updated successfully, but these errors were encountered:
I wasn't able to find a previously submitted issue surrounding this, apologies if I missed it.
Ruff fails (exit code
2
) when trying to write to an output file (via--output-file
) within a directory that doesn't exist with the following message:I'd like to see Ruff automatically create the necessary directories to house the output file if they don't already exist rather than have to ensure the directory exists before invoking Ruff; or have Ruff have an option to automatically create the directories.
Reproducing the issue is fairly simple. Setting the
--output-file
flag to a filesystem location whose directories don't exist should do the trick (e.g.ruff check --isolated --output-file /tmp/does/not/exist/output.txt
). This was tested on the latest Ruff (0.4.5
). Creating the necessary directories (i.e.mkdir -p /tmp/does/not/exist
) and then rerunning the command allows Ruff to succeed.The text was updated successfully, but these errors were encountered: