turtle
turtle copied to clipboard
isCommandInstalled("commandName")
Checklist
- [x] I've read the guide for contributing.
- [x] I've checked there are no other open pull requests for the same change.
- [x] I've formatted all code changes with
./gradlew lcCodeFormat. - [x] I've ran all checks with
./gradlew lcChecks. - [ ] I've updated documentation if needed.
- [x] I've added or updated tests for changes.
Reason for change
When I write a script, I always start with checking that the external tools I need are already installed.
I added a function to simplify that.
Description
shellRun {
require(isCommandInstalled("git")) { "error: git is not installed" }
}