From d3059e8f81af3eebad891e74cb60606879f19776 Mon Sep 17 00:00:00 2001 From: Clare So Date: Thu, 19 Dec 2024 17:50:28 -0500 Subject: [PATCH] Use -z? --- .github/workflows/focus-ios-ui-tests-previous-os.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/focus-ios-ui-tests-previous-os.yml b/.github/workflows/focus-ios-ui-tests-previous-os.yml index 58ee215d9003..4c09b45fe1e6 100644 --- a/.github/workflows/focus-ios-ui-tests-previous-os.yml +++ b/.github/workflows/focus-ios-ui-tests-previous-os.yml @@ -51,9 +51,11 @@ jobs: - name: Create iOS ${{ matrix.ios_version }} simulator id: setup-simulator run: | + xcrun simctl list runtimes + xcrun simctl list runtimes | grep "${{ matrix.ios_version }}" output=$(xcrun simctl list runtimes | grep "${{ matrix.ios_version }}") - echo $output - if [ -n "$output" ]; then + echo "output: '$output'" + if [ -z "$output" ]; then echo "iOS ${{ matrix.ios_version }} simulator has already been installed" else echo "Install iOS ${{ matrix.ios_version }} runtime"