From 5b0b4583a81316a2675721d619aeec29a9d8d147 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 30 Jan 2024 18:00:26 -0500 Subject: [PATCH] fix: download pipx for action, allow support for M1 (#1743) * fix: download pipx for action, allow support for M1 Signed-off-by: Henry Schreiner * Update action.yml * Don't use the quotes on Powershell for command path * Use & to invoke a command with a string argument --------- Signed-off-by: Henry Schreiner Co-authored-by: Joe Rickerby --- action.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b71ede7a0..77b360c42 100644 --- a/action.yml +++ b/action.yml @@ -31,10 +31,14 @@ runs: python-version: "3.8 - 3.12" update-environment: false + # macos-14 (M1) may be missing pipx (due to it not having CPython) + - run: | + "${{ steps.python.outputs.python-path }}" -m pip install pipx + shell: bash + # Redirecting stderr to stdout to fix interleaving issue in Actions. - run: > - pipx run - --python '${{ steps.python.outputs.python-path }}' + "${{ steps.python.outputs.python-path }}" -m pipx run --spec '${{ github.action_path }}' cibuildwheel "${{ inputs.package-dir }}" @@ -53,8 +57,7 @@ runs: if ($PSNativeCommandArgumentPassing) { $PSNativeCommandArgumentPassing = 'Legacy' }; - pipx run - --python "${{ steps.python.outputs.python-path }}" + & "${{ steps.python.outputs.python-path }}" -m pipx run --spec "${{ github.action_path }}" cibuildwheel "${{ inputs.package-dir }}"