Skip to main content

Don’t print inside this function

ID
7137d06
date
2024-04-01 11:13:25+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
33ea08b
message
Don't print inside this function
changed files
1 file, 2 additions, 2 deletions

Changed files

fish_functions/pyfmt.fish (1072) → fish_functions/pyfmt.fish (1094)

diff --git a/fish_functions/pyfmt.fish b/fish_functions/pyfmt.fish
index d208ebd..8e243e5 100644
--- a/fish_functions/pyfmt.fish
+++ b/fish_functions/pyfmt.fish
@@ -4,7 +4,7 @@
 # virtualenv, it will fall back to copies in the scripts repo.
 
 function _run_black
-    if which black
+    if which black >/dev/null
         black $argv
     else
         ~/repos/scripts/.venv/bin/black $argv
@@ -12,7 +12,7 @@ function _run_black
 end
 
 function _run_flake8
-    if which flake8
+    if which flake8 >/dev/null
         flake8 $argv
     else
         ~/repos/scripts/.venv/bin/flake8 $argv