feat: Use safe_abs_path in find_common_root function

This commit is contained in:
Paul Gauthier (aider) 2024-08-22 13:57:40 -07:00
parent 1a50a8cc5e
commit 5e93dcf2cc

View file

@ -274,11 +274,11 @@ class Spinner:
def find_common_root(abs_fnames):
if len(abs_fnames) == 1:
return os.path.dirname(list(abs_fnames)[0])
return safe_abs_path(os.path.dirname(list(abs_fnames)[0]))
elif abs_fnames:
return os.path.commonpath(list(abs_fnames))
return safe_abs_path(os.path.commonpath(list(abs_fnames)))
else:
return os.getcwd()
return safe_abs_path(os.getcwd())
def check_pip_install_extra(io, module, prompt, pip_install_cmd):