Comments (4)
Ya, I think lein.bat
is a better choice too.
Works with all shells.
Are there any advantages to lein.ps1
?
from setup-clojure.
Hi,
I have just also stumbled upon this independently and was about to raise an issue 😅
this should be considered a bug IMHO . lein
cannot be found when trying to invoke it on the cmd
shell
'lein' is not recognized as an internal or external command,
operable program or batch file.
The expecation here is I think that the action should work with any shell.
To reproduce
- Setup GH action for MS-Windows that installs
lein
withsetup-clojure
and callslein version
on thepowershell
,pwsh
andcmd
shells
test-lein-cmd:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- name: Install lein
uses: DeLaGuardo/[email protected]
with:
lein: '2.9.10'
- name: lein powershell
shell: powershell
run: |
lein version
- name: lein pwsh
shell: pwsh
run: |
lein version
- name: lein cmd
shell: cmd
run: |
lein version
- Run the GH action, you should see tha the
powershell
andpwsh
succeed butcmd
fails (only showing the latter below)
2022-11-20T17:22:49.2775007Z ##[group]Run lein version
2022-11-20T17:22:49.2775419Z lein version
2022-11-20T17:22:49.2810382Z shell: C:\Windows\system32\cmd.EXE /D /E:ON /V:OFF /S /C "CALL "{0}""
2022-11-20T17:22:49.2810728Z env:
2022-11-20T17:22:49.2811669Z JAVA_HOME: C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.352-8\x64
2022-11-20T17:22:49.2812093Z JAVA_HOME_8_X64: C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.352-8\x64
2022-11-20T17:22:49.2812531Z LEIN_HOME: C:\hostedtoolcache\windows\Leiningen\2.9.10-9-5\x64
2022-11-20T17:22:49.2812865Z ##[endgroup]
2022-11-20T17:22:49.3016487Z 'lein' is not recognized as an internal or external command,
2022-11-20T17:22:49.3017128Z operable program or batch file.
2022-11-20T17:22:49.3044548Z ##[error]Process completed with exit code 1.
The solution here is either to replace the .ps1
script with https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat
as pointed out by @borkdude, or install the .bat
script alongside the .ps1
file. I suppose tha latter option, to answer @lread's question, has the advantage that when running a job with PowerShell (the default shell on GH actions) it will still use the ps1 script which will give slightly better perfofrmance than spawning a new conhost to execute the batch script.
Thanks
from setup-clojure.
Instead of choosing one from lein.ps1
and lein.bat
, I decided to use both :) This should fix the issue. Feel free to reopen in case something isn't working
from setup-clojure.
Thanks! Will try soon
from setup-clojure.
Related Issues (20)
- Failed due to HTTP 404 of cljstyle HOT 1
- 404 on cljstyle HOT 3
- leiningen classpath not set correctly HOT 6
- 404 on leiningen download (gitea)
- Clojure install error after boot.exe/cache update HOT 2
- Clojure cli tools are not available on the Windows pwsh shell HOT 1
- Consider using the new officially sanctioned clj-msi when installing clojure on Windows HOT 25
- Consider moving `pre` logic to the main entrypoint
- Version 9.3 doesn't find bb in a monorepo HOT 2
- Support for arm64 runners
- invalidate-cache: true doesn't work on self-hosted runners
- latest for cli should only use latest stable version HOT 3
- Add annotations similar to clojure-lint-action HOT 1
- Update to node 16+ HOT 3
- "Bad Credentials" fetching clj-kondo HOT 5
- Clojure CLI downloads are moving to Github releases HOT 4
- Builds failing due to HTTP 404 HOT 2
- Request: add polylith tool to the list of tools that can be installed HOT 3
- API Rate Limit exceeded errors HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-clojure.