Skip to content

Commit

Permalink
Ensure conda prefix directories are not present before creating envir…
Browse files Browse the repository at this point in the history
…onments
  • Loading branch information
thomashampson committed Sep 27, 2024
1 parent 6d6ae64 commit 60faee4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions installers/conda/linux/create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ mkdir -p "$bundle_contents"

# Create conda environment internally. --always-copy ensures no symlinks are used
bundle_conda_prefix="$bundle_contents"
# Make sure the directory doesn't exist before we create the conda environment otherwise it will fail
rm -rf "$bundle_conda_prefix"

echo "Creating Conda environment in '$bundle_conda_prefix'"
"$CONDA_EXE" create --quiet --prefix "$bundle_conda_prefix" --always-copy \
Expand Down
5 changes: 4 additions & 1 deletion installers/conda/osx/create_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,16 @@ elif [ -e "$BUILD_DIR" ]; then
fi

# Create basic directory structure.
mkdir -p "$bundle_contents"/{Resources,MacOS}
mkdir -p "$bundle_contents"/MacOS

# Create conda environment internally.
# --always-copy ensures no symlinks are used
# --platform osx-64 is required to allow ARM-based systems to install the osx-64 mantid packages.
bundle_conda_prefix="$bundle_contents"/Resources

# Make sure the directory doesn't exist before we create the conda environment otherwise it will fail
rm -rf "$bundle_conda_prefix"

echo "Creating Conda environment in '$bundle_conda_prefix'"
"$CONDA_EXE" create --quiet --prefix "$bundle_conda_prefix" --always-copy --platform osx-64 \
--channel "$conda_channel" --channel conda-forge --yes \
Expand Down

0 comments on commit 60faee4

Please sign in to comment.