Skip to content

Commit

Permalink
Install clojure cli tools to a location common to powershell & pwsh (#62
Browse files Browse the repository at this point in the history
)

* Install clojure cli tools to a location common to powershell & pwsh

* reference PR branch in smoke test

* use fork

* Ref PR in correct job

* Reset action location before merge

Co-authored-by: ikappaki <ikappaki@users.noreply.github.com>
  • Loading branch information
ikappaki and ikappaki authored Jul 21, 2022
1 parent 4dcfa4b commit 3410b07
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,8 @@ jobs:
with:
cli: 1.10.1.693

- name: Execute clojure code on Linux and MacOS
if: ${{ matrix.os != 'windows-latest' }}
run: clojure -e "(+ 1 1)"
shell: bash

- name: Execute clojure code on Windows
if: ${{ matrix.os == 'windows-latest' }}
- name: Execute clojure code
run: clojure -e "(+ 1 1)"
shell: powershell

test-clojure-cmd-exe:
runs-on: windows-latest
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,8 @@ jobs:
cmd-exe-workaround: 'latest' # Replaces `clojure` with `deps.clj` on Windows
zprint: 1.2.3 # zprint

- name: Execute clojure code on Linux and MacOS
if: ${{ matrix.os != 'windows-latest' }}
run: clojure -e "(+ 1 1)"
shell: bash

- name: Execute clojure code on Windows
if: ${{ matrix.os == 'windows-latest' }}
- name: Execute clojure code
run: clojure -e "(+ 1 1)"
shell: powershell

- name: Get leiningen version
run: lein -v
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ function setupWindows(version, cmdExeWorkaround, githubAuth) {
}
const url = `download.clojure.org/install/win-install${version === 'latest' ? '' : `-${version}`}.ps1`;
yield exec.exec(`powershell -c "iwr -useb ${url} | iex"`, [], {
// Install to a modules location common to powershell/pwsh
env: { PSModulePath: 'C:\\Program Files\\WindowsPowerShell\\Modules' },
input: Buffer.from('1')
});
});
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export async function setupWindows(
version === 'latest' ? '' : `-${version}`
}.ps1`
await exec.exec(`powershell -c "iwr -useb ${url} | iex"`, [], {
// Install to a modules location common to powershell/pwsh
env: {PSModulePath: 'C:\\Program Files\\WindowsPowerShell\\Modules'},
input: Buffer.from('1')
})
}

0 comments on commit 3410b07

Please sign in to comment.