turtle icon indicating copy to clipboard operation
turtle copied to clipboard

isCommandInstalled("commandName")

Open jmfayard opened this issue 3 years ago • 0 comments

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" }
}

jmfayard avatar Aug 05 '22 15:08 jmfayard