Closed rgkirch closed 1 year ago
Thanks, @rgkirch! This is definitely a gap in our documentation.
What's the advantage of creating a !/usr/bin/env sh
script that calls PowerShell over a .ps1
script?
So, I use msys2 and the incantation that I need is powershell -command clojure -M:test "$@"
. If I'm in powershell and I invoke .\bin\kaocha.ps1
then I need powershell -command clojure -M:test $args
. Powershell doesn't handle the terminal color things and gives me some not pretty output:
←[33mWARNING: ←[mDid not load a configuration file and using the defaults.
This is fine for experimenting, but for long-term use, we recommend creating a configuration file to avoid changes in behavior between releases.
To create a configuration file using the current defaults and configuration file location, create a file named tests.edn that contains '#kaocha/v1 {}'.
Reflection warning, meander/util/epsilon.cljc:758:24 - reference to field val can't be resolved.
Success!
[(←[31mF←[m.←[31mF←[m.←[31mF←[m)]
Randomized with --seed 955536687
←[31mFAIL←[m in transform-test/extra-stuff-test (transform_test.clj:7)
My msys2 terminal is fine though. I don't actually use powershell for anything but clojure installs as a powershell module (whatever that is).
I think it would be great if we could provide a standard binstub that works across platforms. After all you might be collaborating with people who don't use the same os. Maybe we can do a platform check and switch to the right invocation?
Your original version used sh I think? Is that available on Windows by default now?
No, I don't think you get sh by default.
Right, in that case it's probably better to recommend that people add a separate kaocha.bat
to their projects if they want to support windows users as well.
Yea. I think the important part is to have the correct incantation. I think what I have now is in line with what you suggested.
Thank you for your ocntribution to Kaocha!
Released in v1.82.1306
[lambdaisland/kaocha "1.82.1306"] ;; deps.edn
{lambdaisland/kaocha {:mvn/version "1.82.1306"}} ;; project.clj
Codecov Report
Patch and project coverage have no change.
Additional details and impacted files
```diff @@ Coverage Diff @@ ## main #406 +/- ## ======================================= Coverage 75.34% 75.34% ======================================= Files 52 52 Lines 2786 2786 Branches 267 267 ======================================= Hits 2099 2099 Misses 521 521 Partials 166 166 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `56.56% <ø> (ø)` | | | unit | `69.63% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None):umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.