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.
This commit is contained in:
Eric S. Raymond 2021-08-10 19:56:08 -04:00 committed by GitHub
parent ed84a4e7e3
commit 817fcfdc9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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'