From 13153f8246d0ef66d7581a68e18ac5e24343fbaa Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Thu, 13 Jul 2023 08:38:42 -0700 Subject: [PATCH] Fix specifying a custom planner --- action.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 6d4ce36..662282e 100644 --- a/action.yml +++ b/action.yml @@ -311,13 +311,17 @@ runs: export NIX_INSTALLER_NO_CONFIRM=true echo "Set NIX_INSTALLER_NO_CONFIRM=$NIX_INSTALLER_NO_CONFIRM" - if [ "${RUNNER_OS}" == "Linux" ]; then - export PLANNER="linux" - elif [ "${RUNNER_OS}" == "macOS" ]; then - export PLANNER="macos" + if [ -n "${{ inputs.planner }}" ]; then + export PLANNER="${{ inputs.planner }}" else - echo "${RUNNER_OS} not supported" - exit 1 + if [ "${RUNNER_OS}" == "Linux" ]; then + export PLANNER="linux" + elif [ "${RUNNER_OS}" == "macOS" ]; then + export PLANNER="macos" + else + echo "${RUNNER_OS} not supported" + exit 1 + fi fi curl --retry 20 -L $NIX_INSTALLER_URL | sh -s -- install ${PLANNER} ${{ inputs.extra-args }}