From 1866743c475eadc6eb3f1c02d6b757588117e57d Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Sat, 21 Aug 2021 07:08:45 -0500 Subject: [PATCH] Remove absolute path to flock; change PATH in GH Actions --- .github/workflows/main.yml | 4 +++- build.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b4fc54f6..012019cdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,9 @@ jobs: path: uhabits-android/build/outputs/ - name: Install flock - run: brew install util-linux + run: | + brew install util-linux + echo "/usr/local/opt/util-linux/bin" >> $GITHUB_PATH - name: Run Android Tests run: ./build.sh android-tests ${{ matrix.api }} diff --git a/build.sh b/build.sh index d1de400ed..b865429de 100755 --- a/build.sh +++ b/build.sh @@ -75,7 +75,7 @@ android_test() { AVDNAME=${AVD_PREFIX}${API} ( - /usr/local/opt/util-linux/bin/flock 10 + flock 10 log_info "Stopping Android emulator..." while [[ -n $(pgrep -f ${AVDNAME}) ]]; do pkill -9 -f ${AVDNAME} @@ -91,7 +91,7 @@ android_test() { --package "system-images;android-$API;default;x86_64" \ --device "Nexus 4" || return 1 - /usr/local/opt/util-linux/bin/flock -u 10 + flock -u 10 ) 10>/tmp/uhabitsTest.lock log_info "Launching emulator..."