From 5e53e0f5b1e624a77f0dbd5f2f4bb1e737d5b894 Mon Sep 17 00:00:00 2001 From: Tomohisa Tanaka Date: Wed, 4 Oct 2023 21:02:24 +0900 Subject: [PATCH] Test cygpath on Windows --- .github/workflows/windows-cygpath.yml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/windows-cygpath.yml diff --git a/.github/workflows/windows-cygpath.yml b/.github/workflows/windows-cygpath.yml new file mode 100644 index 0000000..64016d2 --- /dev/null +++ b/.github/workflows/windows-cygpath.yml @@ -0,0 +1,48 @@ +name: Windows cygpath + +on: + push: + branches: [ "windows-cygpath" ] + pull_request: + branches: [ "windows-cygpath" ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + steps: + - name: Print USERPROFILE + run: echo $USERPROFILE + shell: bash + - name: Save the Cygwin path of USERPROFILE to FOO + run: (echo 'FOO<> "$GITHUB_ENV" + shell: bash + - name: Print FOO + run: | + echo $FOO + echo ${{env.FOO}} + shell: bash + - name: Save the Cygwin path of USERPROFILE to BAR + run: echo BAR="$(cygpath -u $USERPROFILE)" >> "$GITHUB_ENV" + shell: bash + - name: Print BAR + run: | + echo $BAR + echo ${{env.BAR}} + shell: bash + - name: Set BAZ + id: cygwin_path_home + run: echo BAZ="$USERPROFILE" >> "$GITHUB_OUTPUT" + shell: bash + - name: Print BAZ + run: | + # NG + cygpath -u ${{steps.cygwin_path_home.outputs.BAZ}} + # OK + cygpath -u $BAZ + shell: bash + env: + BAZ: ${{steps.cygwin_path_home.outputs.BAZ}} + - name: Print HOME + run: echo $HOME + shell: bash