From cc5a916fa3571e64ac2cb2c76b541deac7be276d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 15 Oct 2023 14:19:14 +0900 Subject: Check if any tools needed [ci skip] Because of a trap of cmd.exe that `echo something > output` prints not only "something" also the space before `>`, remove unexpected spaces. --- .github/workflows/windows.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.github/workflows/windows.yml') diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 46b4be0596..cfd432a87f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -68,11 +68,16 @@ jobs: ::- find needed tools set NEEDS= for %%I in (patch.exe) do if "%%~$PATH:I" == "" ( - echo NEEDS=%NEEDS% %%I + call set NEEDS=%%NEEDS%% %%~nI ) else ( echo %%I: %%~$PATH:I ) - echo needs=%NEEDS% >> %GITHUB_OUTPUT% + echo.needs=%NEEDS%>>%GITHUB_OUTPUT% + if "%NEEDS%" == "" ( + echo [debug] All needed tools found + ) else ( + echo [warning^]Needs%NEEDS% + ) - uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # v2 id: setup-msys2 @@ -81,9 +86,6 @@ jobs: install: >- ${{ steps.find-tools.outputs.needs }} if: ${{ steps.find-tools.outputs.needs != '' }} - # FIXME: The above `!= ''` check is not working correctly, so this runs - # even when `needs` is empty. Remove this `continue-on-error` after fixing it. - continue-on-error: true - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: -- cgit v1.2.3