feat: add dependency check in dotf script and modify package installation command
Some checks failed
Nix Format Check / check-format (push) Failing after 37s

This commit is contained in:
2025-03-10 19:35:55 +01:00
parent bfa084fe7f
commit 82ee7361bd
3 changed files with 4 additions and 10 deletions

View File

@ -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}")