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:
parent
c7e7e1d884
commit
ac7109052c
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user