File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,21 @@ check_python_version() {
9090check_and_install_packages () {
9191 print_info " Checking required Python packages..."
9292
93- # List of required packages (import_name:package_name)
94- declare -A required_packages=(
95- [ " typer" ]= " typer"
96- [ " rich" ]= " rich"
97- [ " boto3" ]= " boto3"
98- [ " yaml" ]= " PyYAML"
93+ # List of required packages (import_name:package_name pairs )
94+ required_packages=(
95+ " typer: typer"
96+ " rich: rich"
97+ " boto3: boto3"
98+ " yaml: PyYAML"
9999 )
100100 missing_packages=()
101101
102102 # Check each package
103- for import_name in " ${! required_packages[@]} " ; do
103+ for package_pair in " ${required_packages[@]} " ; do
104+ import_name=" ${package_pair%%:* } "
105+ package_name=" ${package_pair##*: } "
104106 if ! $PYTHON_CMD -c " import $import_name " > /dev/null 2>&1 ; then
105- missing_packages+=(" ${required_packages[$import_name]} " )
107+ missing_packages+=(" $package_name " )
106108 fi
107109 done
108110
You can’t perform that action at this time.
0 commit comments