mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-30 04:20:43 +00:00
OOP: Installation Checks
This commit is contained in:
parent
61c44e1a76
commit
bab2696bac
3 changed files with 100 additions and 4 deletions
|
@ -5,6 +5,10 @@ import shutil
|
|||
from util import Command, Input, Print, Path
|
||||
|
||||
|
||||
class InstallationError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def _generate_install_text(install_text, package_name, yay=False, git=False):
|
||||
if install_text == 'default':
|
||||
install_text = f'Do you wish to install {package_name}?'
|
||||
|
|
|
@ -22,10 +22,10 @@ def check_dir_exists(paths):
|
|||
for dir_path in paths:
|
||||
dir_path = os.path.expanduser(dir_path)
|
||||
if os.path.isdir(dir_path):
|
||||
return True
|
||||
return True, dir_path
|
||||
break
|
||||
else:
|
||||
return False
|
||||
return False, None
|
||||
|
||||
|
||||
def check_file_exists(paths):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue