The create command tests out if you can do options and seems to work just fine.

master
Zed A. Shaw 1 year ago
parent 809e0afefa
commit 85385a7eb3
  1. 20
      commands/create.js

@ -0,0 +1,20 @@
import fs from "fs/promises";
import { mkdir_to, exec_i } from "../lib/builderator.js";
import { log } from "../lib/logging.js";
export const description = "Test command.";
export const options = [
["--fail", "cause it to fail", false]
];
export const main = async (opts) => {
if(opts.fail) {
log.error("Producing failure.");
process.exit(1);
} else {
log.info("Exiting normally.");
process.exit(0);
}
}
Loading…
Cancel
Save