1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

♻️ refactor(unix): replace deprecated distutils.spawn with shutil.which

- remove deprecated distutils.spawn import
- add shutil import
- implement find_executable using shutil.which for better compatibility
This commit is contained in:
lu.jin 2024-12-26 09:46:45 +08:00
parent c7e7e1d884
commit ac7109052c

View File

@ -3,8 +3,12 @@ import sys
import tty
import termios
import colorama
from distutils.spawn import find_executable
# from distutils.spawn import find_executable
from .. import const
import shutil
def find_executable(name):
return shutil.which(name)
init_output = colorama.init