Skip to content

Commit

Permalink
Fix unbound variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-thm committed Aug 5, 2024
1 parent 89cce47 commit 531938b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions uv/private/create_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ source "$BUILD_WORKSPACE_DIRECTORY/$target/bin/activate"
"$UV" pip install -r "$REQUIREMENTS_TXT"

site_packages_extra_files=({{site_packages_extra_files}})
site_packages_dir=$(find "$BUILD_WORKSPACE_DIRECTORY/$target/lib" -type d -name 'site-packages')
for file in "${site_packages_extra_files[@]}"; do
cp "$file" "$site_packages_dir"/
done
if [ ! -z ${site_packages_extra_files+x} ]; then
site_packages_dir=$(find "$BUILD_WORKSPACE_DIRECTORY/$target/lib" -type d -name 'site-packages')
for file in "${site_packages_extra_files[@]}"; do
cp "$file" "$site_packages_dir"/
done
fi

echo "${bold}Created '${target}', to activate run:${normal}"
echo " source ${target}/bin/activate"

0 comments on commit 531938b

Please sign in to comment.