mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-29 15:26:35 +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 subprocess | ||||||
| import os | import os | ||||||
| import shutil | import shutil | ||||||
|  | from pathlib import Path | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class Command: | class Command: | ||||||
|  | @ -149,7 +150,7 @@ class Input: | ||||||
|         Print.question(question) |         Print.question(question) | ||||||
|         while True: |         while True: | ||||||
|             ans = input('   Y/N: ') |             ans = input('   Y/N: ') | ||||||
|             if ans.lower() == 'y': |             if ans.lower() == 'y' or ans == '': | ||||||
|                 return True |                 return True | ||||||
|             elif ans.lower() == 'n': |             elif ans.lower() == 'n': | ||||||
|                 return False |                 return False | ||||||
|  | @ -263,9 +264,9 @@ class Install: | ||||||
|             if Input.yes_no(install_text): |             if Input.yes_no(install_text): | ||||||
|                 url = f'https://aur.archlinux.org/{repository}.git' |                 url = f'https://aur.archlinux.org/{repository}.git' | ||||||
|                 Command.execute(f'git clone {url}') |                 Command.execute(f'git clone {url}') | ||||||
|                 Command.execute(f'cd {repository}', use_os=True) |                 os.chdir(repository) | ||||||
|                 Command.execute('makepkg -si') |                 Command.execute('makepkg -si') | ||||||
|                 Command.execute('cd ..', use_os=True) |                 os.chdir(Path(__file__).parent.absolute()) | ||||||
|                 shutil.rmtree(repository) |                 shutil.rmtree(repository) | ||||||
|                 return True |                 return True | ||||||
|             else: |             else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue