DeLaGuardo / setup-clojure

GitHub Action to provision clojure's most popular build tools for Linux, Mac OS X and Windows.
MIT License
183 stars 27 forks source link

Clojure cli tools are not available on the Windows pwsh shell #61

Closed ikappaki closed 2 years ago

ikappaki commented 2 years ago

Hi,

the Clojure cli tools on windows are installed on a location that is only available to the powershell shell but not available to the pwsh shell. The latter is also the default GitHub Action shell on windows, and as such calling Clojure will fail when a shell is not specified:

clojure --version

     The term 'clojure' is not recognized as a name of a cmdlet, function, script file, or executable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct
     and try again.

to reproduce, create a job running Clojure with the default shell:

jobs:
  cross-platform:
    runs-on: ${{matrix.os}}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest]
    steps:
      - uses: actions/checkout@v2.2.0
        with:
          fetch-depth: 0

      - name: Prepare java
        uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: '8'

      - name: Install Clojure
        uses: DeLaGuardo/setup-clojure@master
        with:
          cli: 1.10.3.1013

      - name: test
        run: |
          clojure --version

it will error out with the previous message.

This also has the annoying effect that one has to specify two slightly different jobs when running cross platform tests with the same run body.

PR to follow.

thanks

DeLaGuardo commented 2 years ago

Included in 9.2 release.