Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align our subprocess usage with current best practices. #12940

Merged
merged 6 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow for unprompted installation
  • Loading branch information
skullydazed committed May 19, 2021
commit 543449d7cca8aa25fb7890ab111caa2ed1239116
2 changes: 1 addition & 1 deletion lib/python/qmk/cli/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def doctor(cli):

if not bin_ok:
if yesno('Would you like to install dependencies?', default=True):
cli.run(['util/qmk_install.sh'], stdin=DEVNULL, capture_output=False)
cli.run(['util/qmk_install.sh', '-y'], stdin=DEVNULL, capture_output=False)
bin_ok = check_binaries()

if bin_ok:
Expand Down
2 changes: 1 addition & 1 deletion util/install/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEBCONF_NONINTERACTIVE_SEEN=true
export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN

_qmk_install_prepare() {
sudo apt-get update
sudo apt-get update $SKIP_PROMPT
}

_qmk_install() {
Expand Down
2 changes: 1 addition & 1 deletion util/install/fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _qmk_install() {
echo "Installing dependencies"

# TODO: Check whether devel/headers packages are really needed
sudo dnf -y install \
sudo dnf $SKIP_PROMPT install \
clang diffutils git gcc glibc-headers kernel-devel kernel-headers make unzip wget zip \
python3 \
avr-binutils avr-gcc avr-libc \
Expand Down
2 changes: 1 addition & 1 deletion util/install/freebsd.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

_qmk_install_prepare() {
sudo pkg update
sudo pkg update $SKIP_PROMPT
}

_qmk_install() {
Expand Down
2 changes: 1 addition & 1 deletion util/install/msys2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

_qmk_install_prepare() {
pacman -Syu
pacman -Syu $MSYS2_CONFIRM
}

_qmk_install() {
Expand Down
2 changes: 1 addition & 1 deletion util/install/void.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_qmk_install() {
echo "Installing dependencies"

sudo xbps-install \
sudo xbps-install $SKIP_PROMPT \
gcc git make wget unzip zip \
python3-pip \
avr-binutils avr-gcc avr-libc \
Expand Down
7 changes: 7 additions & 0 deletions util/qmk_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

QMK_FIRMWARE_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
QMK_FIRMWARE_UTIL_DIR=$QMK_FIRMWARE_DIR/util
if [ "$1" = "-y" ]; then
SKIP_PROMPT='-y'
MSYS2_CONFIRM='--noconfirm'
else
SKIP_PROMPT=''
MSYS2_CONFIRM=''
fi

case $(uname -a) in
*Darwin*)
Expand Down