瀏覽代碼

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.
Eric S. Raymond 3 年之前
父節點
當前提交
817fcfdc9a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      util/qmk_install.sh

+ 1 - 1
util/qmk_install.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #!/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
 QMK_FIRMWARE_UTIL_DIR=$QMK_FIRMWARE_DIR/util
 if [ "$1" = "-y" ]; then
 if [ "$1" = "-y" ]; then
     SKIP_PROMPT='-y'
     SKIP_PROMPT='-y'