We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4fac02 commit 8a6fac9Copy full SHA for 8a6fac9
1 file changed
pylsp_ruff/plugin.py
@@ -510,6 +510,7 @@ def run_ruff(
510
511
arguments = subcommand.build_args(document_path, settings, fix, extra_arguments)
512
513
+ p = None
514
if executable is not None:
515
log.debug(f"Calling {executable} with args: {arguments} on '{document_path}'")
516
try:
@@ -518,7 +519,11 @@ def run_ruff(
518
519
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
520
except Exception:
521
log.error(f"Can't execute ruff with given executable '{executable}'.")
- 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
+ )
527
cmd = [sys.executable, "-m", "ruff", str(subcommand)]
528
cmd.extend(arguments)
529
0 commit comments