diff --git a/.github/workflows/matrix_build.yml b/.github/workflows/matrix_build.yml index e13761bd..9f9d35f9 100644 --- a/.github/workflows/matrix_build.yml +++ b/.github/workflows/matrix_build.yml @@ -82,7 +82,7 @@ jobs: - name: Install build dependencies if: env.NEED == 'true' run: | - make install-deps + sudo make install-deps if [ ! -z "$ACT" ]; then echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV else @@ -284,7 +284,7 @@ jobs: - name: Install build dependencies run: | - make install-deps + sudo make install-deps ls -l deps || true if [ ! -z "$ACT" ]; then echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV diff --git a/Makefile b/Makefile index 48a8b94f..ae2e1e72 100644 --- a/Makefile +++ b/Makefile @@ -56,10 +56,14 @@ $(BR_DIR): $(ROOT_DIR)/buildroot-$(BR_VER).tar.gz install-deps: - if [ ! -f /.dockerenv ]; then SUDO=sudo; fi - DEBIAN_FRONTEND=noninteractive $(SUDO) apt-get update && \ - $(SUDO) apt-get -y install \ - build-essential git make libncurses-dev wget curl cpio rsync bc unzip +ifneq ($(shell id -u), 0) + @echo "You must be root to perform this action." +else + DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get -y install \ + build-essential git make libncurses-dev wget curl \ + cpio rsync bc unzip file +endif %_info: