summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2021-08-10 19:56:08 -0400
committerGitHub <noreply@github.com>2021-08-11 00:56:08 +0100
commit817fcfdc9a146f949e1edeba088866eff8cbcde2 (patch)
tree12fe2f6e402f2c436a4753953cc3c6ec4b02bb7f
parented84a4e7e3e65d1ef090117cdb9c6d70ed554a28 (diff)
Fix shell port bug in computation of QMK_FIRMWARE_DIR (#13950)
Previous code would fail if cd echoes the tathet directory to stdout, which is pretty common. Redirecting its output to /dev/null solves the problem.
-rwxr-xr-xutil/qmk_install.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/qmk_install.sh b/util/qmk_install.sh
index 06eb4f0228..5f22ba0ad5 100755
--- a/util/qmk_install.sh
+++ b/util/qmk_install.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-QMK_FIRMWARE_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
+QMK_FIRMWARE_DIR=$(cd -P -- "$(dirname -- "$0")/.." >/dev/null && pwd -P)
QMK_FIRMWARE_UTIL_DIR=$QMK_FIRMWARE_DIR/util
if [ "$1" = "-y" ]; then
SKIP_PROMPT='-y'