Skip to content

Commit 755f7a3

Browse files
committed
Use the conda subdir to get the target platform
The archive_env_logs script needs to know the platform in order to extract the log files.
1 parent 4604fb4 commit 755f7a3

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

conda/recipes/archive_env_logs.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ build_prefix=$1
44
prefix=$2
55
package_name=$3
66

7-
platform=$(uname)
8-
if [ "$platform" == Linux ] ; then
9-
platform_dir=linux-64
10-
elif [ "$platform" == Darwin ] ; then
11-
platform_dir=osx-64
12-
else
13-
platform_dir=none
14-
fi
7+
# This gets the subdir from conda in the form e.g. subdir: linux-64, then extracts
8+
# the platform
9+
platform_dir=$(conda config --show subdir | grep 'subdir' | awk '{print $2}')
1510

1611
mkdir -p ../../$platform_dir/env_logs
1712
source ../../../mambaforge/etc/profile.d/conda.sh

0 commit comments

Comments
 (0)