Skip to content

Commit

Permalink
On Linux, only delete Python installations with the same architecture.
Browse files Browse the repository at this point in the history
This matches the macOS behavior and allows users to install both the
free-threading and default builds at the same time.
  • Loading branch information
colesbury committed Jan 22, 2025
1 parent 8c714c4 commit 796f49b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions installers/nix-setup-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ echo "Check if Python hostedtoolcache folder exist..."
if [ ! -d $PYTHON_TOOLCACHE_PATH ]; then
echo "Creating Python hostedtoolcache folder..."
mkdir -p $PYTHON_TOOLCACHE_PATH
elif [ -d $PYTHON_TOOLCACHE_VERSION_PATH ]; then
echo "Deleting Python $PYTHON_FULL_VERSION"
rm -rf $PYTHON_TOOLCACHE_VERSION_PATH
elif [ -d $PYTHON_TOOLCACHE_VERSION_ARCH_PATH ]; then
echo "Deleting Python $PYTHON_FULL_VERSION ($ARCH)"
rm -rf $PYTHON_TOOLCACHE_VERSION_ARCH_PATH
fi

echo "Create Python $PYTHON_FULL_VERSION folder"
Expand Down

0 comments on commit 796f49b

Please sign in to comment.