Fix shell port bug in computation of QMK_FIRMWARE_DIR (#13950) 0.13.34
authorEric S. Raymond <esr@thyrsus.com>
Tue, 10 Aug 2021 23:56:08 +0000 (19:56 -0400)
committerGitHub <noreply@github.com>
Tue, 10 Aug 2021 23:56:08 +0000 (00:56 +0100)
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.

util/qmk_install.sh

index 06eb4f0..5f22ba0 100755 (executable)
@@ -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'