luckyframework / luckyframework/lucky_cli
System check script issues on Windows
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 92
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
In a generated app, you get a script/system_check.cr which helps to ensure your app is setup and bootstrapped properly in development before booting. (e.g. if you need yarn to run your app, then ensure yarn is installed before trying to boot the app).
However, speaking of yarn, there's an issue on Windows.
The system_check runs this
which checks for the existence of an executable yarn.
This find_executable method will automatically append .exe to whatever command you pass in
This means it's actually looking for yarn.exe which doesn't exist. When you install node and yarn, yarn (as well as some other node related commands like pnpm, etc...) are just shell scripts. Even if yarn is installed properly, this will fail.
An alternate way to solve this could be to just run yarn -v and then check $?. That value seems to return 0 on Linux and True on Windows. I'd assume Process.run("yarn -v").normal_exit? would work, but it does feel a little hacky. I'm open to other ideas if anyone has any.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated script/system_check.cr and the helper in script/helpers/function_helpers.cr.ecr, especially the referenced executable check. Reproduce the system check on Windows with yarn installed and compare its behavior with the reported executable lookup. Done means a generated app recognizes an installed yarn and proceeds through the check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100