Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
build: remove quotes from rust-version
Fintan Halpenny committed 11 months ago
commit 6f25d73d3df062e7b49df4b2e9dd7cb5aa3a98ca
parent e9cf91e1bc9555c6b9cf7e6f88e6c6a93f61116f
1 file changed +8 -4
modified build/rust-version
@@ -1,7 +1,11 @@
-
#!/bin/sh
+
#! /usr/bin/env bash
+
set -euo pipefail

-
if ! version=$(grep -m 1 -oP "channel\s*=\s*\K(.*)" rust-toolchain.toml); then
-
  echo "fatal: no rust version found via rust-toolchain.toml" >&2 ; exit 1
+
if ! version=$(grep -m 1 -oP '^\s*channel\s*=\s*"?\K([\d\.]+)' rust-toolchain.toml)
+
then
+
  echo "fatal: no rust version found via rust-toolchain.toml" >&2
+
  exit 1
+
else
+
  echo "$version"
fi

-
echo "$version"