@@ -42,27 +42,21 @@ runs:
42
42
--spec '${{ github.action_path }}'
43
43
cibuildwheel
44
44
"${{ inputs.package-dir }}"
45
- -- output-dir "${{ inputs.output-dir }}"
46
- -- config-file "${{ inputs.config-file }}"
47
- --only "${{ inputs.only }}"
45
+ ${{ inputs.output-dir != '' && format('-- output-dir "{0}"', inputs.output-dir) || ''}}
46
+ ${{ inputs.config-file != '' && format('-- config-file "{0}"', inputs.config-file) || ''}}
47
+ ${{ inputs.only != '' && format(' --only "{0}"', inputs.only) || ''}}
48
48
2>&1
49
49
shell: bash
50
50
if: runner.os != 'Windows'
51
51
52
52
# Windows needs powershell to interact nicely with Meson
53
- # $PSNativeCommandArgumentPassing was introduced in pwsh 7.3 and the
54
- # legacy behaviour is needed for backwards compatibility with how this
55
- # was called in the past.
56
53
- run : >
57
- if ($PSNativeCommandArgumentPassing) {
58
- $PSNativeCommandArgumentPassing = 'Legacy'
59
- };
60
54
& "${{ steps.python.outputs.python-path }}" -m pipx run
61
55
--spec "${{ github.action_path }}"
62
56
cibuildwheel
63
57
"${{ inputs.package-dir }}"
64
- -- output-dir '"${{ inputs.output-dir }}"'
65
- -- config-file '"${{ inputs.config-file }}"'
66
- --only '"${{ inputs.only }}"'
58
+ ${{ inputs.output-dir != '' && format('-- output-dir "{0}"', inputs.output-dir) || ''}}
59
+ ${{ inputs.config-file != '' && format('-- config-file "{0}"', inputs.config-file) || ''}}
60
+ ${{ inputs.only != '' && format(' --only "{0}"', inputs.only) || ''}}
67
61
shell: pwsh
68
62
if: runner.os == 'Windows'
0 commit comments