mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-04-27 20:52:27 +00:00
Fixed path changing, enter=y
This commit is contained in:
parent
ea51b5e7ae
commit
ad627ccfcf
1 changed files with 4 additions and 3 deletions
7
lib.py
7
lib.py
|
@ -2,6 +2,7 @@
|
|||
import subprocess
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class Command:
|
||||
|
@ -149,7 +150,7 @@ class Input:
|
|||
Print.question(question)
|
||||
while True:
|
||||
ans = input(' Y/N: ')
|
||||
if ans.lower() == 'y':
|
||||
if ans.lower() == 'y' or ans == '':
|
||||
return True
|
||||
elif ans.lower() == 'n':
|
||||
return False
|
||||
|
@ -263,9 +264,9 @@ class Install:
|
|||
if Input.yes_no(install_text):
|
||||
url = f'https://aur.archlinux.org/{repository}.git'
|
||||
Command.execute(f'git clone {url}')
|
||||
Command.execute(f'cd {repository}', use_os=True)
|
||||
os.chdir(repository)
|
||||
Command.execute('makepkg -si')
|
||||
Command.execute('cd ..', use_os=True)
|
||||
os.chdir(Path(__file__).parent.absolute())
|
||||
shutil.rmtree(repository)
|
||||
return True
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue