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(
510
510
511
511
arguments = subcommand .build_args (document_path , settings , fix , extra_arguments )
512
512
513
+ p = None
513
514
if executable is not None :
514
515
log .debug (f"Calling { executable } with args: { arguments } on '{ document_path } '" )
515
516
try :
@@ -518,7 +519,11 @@ def run_ruff(
518
519
p = Popen (cmd , stdin = PIPE , stdout = PIPE , stderr = PIPE )
519
520
except Exception :
520
521
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
+ )
522
527
cmd = [sys .executable , "-m" , "ruff" , str (subcommand )]
523
528
cmd .extend (arguments )
524
529
p = Popen (cmd , stdin = PIPE , stdout = PIPE , stderr = PIPE )
You can’t perform that action at this time.
0 commit comments