Skip to content

Instantly share code, notes, and snippets.

@zindel
Last active March 26, 2019 12:48
Show Gist options
  • Save zindel/21e3827d322e90fab051ab3f2d3c34b2 to your computer and use it in GitHub Desktop.
Save zindel/21e3827d322e90fab051ab3f2d3c34b2 to your computer and use it in GitHub Desktop.
let runScriptCli = (cmd, proj: Project.t) => {
open RunAsync.Syntax;
let%bind fetched = Project.fetched(proj);
let script = Cmd.getTool(cmd);
switch (Scripts.find(script, proj.scripts)) {
| Some(script) => runScript(script, Cmd.getArgs(cmd), proj)
| None => errorf("Script '%s' not found", script)
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment