Skip to content

Commit 701ff4f

Browse files
committed
fix: more portable version check
1 parent 3e2f478 commit 701ff4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/_utils/version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PRISMA_VERSION=$(pnpm prisma -v)
1111
echo "pnpm prisma -v\n${PRISMA_VERSION}\n"
1212

1313
# extract the binaryTarget from the version command output, e.g., "debian-openssl-1.1.x"
14-
PRISMA_TARGET_PLATFORM=$(echo "${PRISMA_VERSION}" | awk -F'engines/schema-engine-' '{split($2, a, ")"); print a[1]}' | tr -d ' \t\n')
14+
PRISMA_TARGET_PLATFORM=$(echo "${PRISMA_VERSION}" | grep 'engines/schema-engine-' | sed 's/.*engines\/schema-engine-//; s/).*//')
1515

1616
if [ $PRISMA_TARGET_PLATFORM = $EXPECTED_PRISMA_TARGET_PLATFORM ]; then
1717
echo "Current binaryTarget matches expected binaryTarget \"${PRISMA_TARGET_PLATFORM}\""

0 commit comments

Comments
 (0)