feat: add dependency check in dotf script and modify package installation command
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
This commit is contained in:
@ -109,16 +109,9 @@ def ensure_dependencies():
|
||||
printfe("cyan", "Installing missing dependencies...")
|
||||
for package in missing_packages:
|
||||
printfe("blue", f"Installing {package}...")
|
||||
success, output = run_command(['pip', 'install', '--user', package])
|
||||
success, output = run_command(['pip', 'install', '--user', package, '--break-system-packages'])
|
||||
if success:
|
||||
printfe("green", f"Successfully installed {package}")
|
||||
# Attempt to import the newly installed package
|
||||
if package == 'pyfiglet':
|
||||
try:
|
||||
global pyfiglet
|
||||
import pyfiglet
|
||||
except ImportError:
|
||||
printfe("red", f"Failed to import {package} after installation")
|
||||
else:
|
||||
printfe("red", f"Failed to install {package}: {output}")
|
||||
|
||||
|
Reference in New Issue
Block a user