Skip to content

Commit 4ecad89

Browse files
committed
Add probe and var for file
Was testing rustup on a very minimal Debian installation and got errors during the install process (error occurred in `install.sh` of the Rust nightly.) Noticed that Rustup was downloading the i686 nightly instead of x86-64. Installing `file` fixed the problem, and this patch adds the probe to ensure file is installed before attempting to use it. There may still be an issue with the i686 installation, I did not investigate further.
1 parent b497f05 commit 4ecad89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/etc/rustup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ validate_opt() {
231231

232232
probe_need CFG_CURL curl
233233
probe_need CFG_TAR tar
234+
probe_need CFG_FILE file
234235

235236
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
236237
CFG_SELF="$0"
@@ -359,7 +360,7 @@ esac
359360
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
360361
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
361362
then
362-
file -L "$SHELL" | grep -q "x86[_-]64"
363+
"${CFG_FILE}" -L "$SHELL" | grep -q "x86[_-]64"
363364
if [ $? != 0 ]; then
364365
CFG_CPUTYPE=i686
365366
fi

0 commit comments

Comments
 (0)