File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,7 @@ def run_ruff(
510510
511511 arguments = subcommand .build_args (document_path , settings , fix , extra_arguments )
512512
513+ p = None
513514 if executable is not None :
514515 log .debug (f"Calling { executable } with args: { arguments } on '{ document_path } '" )
515516 try :
@@ -518,7 +519,11 @@ def run_ruff(
518519 p = Popen (cmd , stdin = PIPE , stdout = PIPE , stderr = PIPE )
519520 except Exception :
520521 log .error (f"Can't execute ruff with given executable '{ executable } '." )
521- else :
522+ if p is None :
523+ log .debug (
524+ f"Calling ruff via '{ sys .executable } -m ruff'"
525+ f" with args: { arguments } on '{ document_path } '"
526+ )
522527 cmd = [sys .executable , "-m" , "ruff" , str (subcommand )]
523528 cmd .extend (arguments )
524529 p = Popen (cmd , stdin = PIPE , stdout = PIPE , stderr = PIPE )
You can’t perform that action at this time.
0 commit comments