Booru Support #1
2 changed files with 4 additions and 4 deletions
|
@ -14,6 +14,7 @@ const optionDefinitions = [
|
|||
name: "verbose",
|
||||
type: Boolean,
|
||||
alias: "v",
|
||||
defaultValue: false,
|
||||
description: "Print debugging output.",
|
||||
},
|
||||
{
|
||||
|
@ -59,7 +60,7 @@ if (args.help) {
|
|||
if (args.verbose) console.log("Running in verbose mode.\n");
|
||||
|
||||
if (args.writeConfig) {
|
||||
writeConfig();
|
||||
writeConfig(args.verbose);
|
||||
console.log("Wrote default config file to ./config.jsonc");
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { writeFileSync } from "fs";
|
||||
import args from "./cli.js";
|
||||
/**
|
||||
* Writes the sample config file to disk
|
||||
* @returns Nothing
|
||||
*/
|
||||
export default function writeConfig() {
|
||||
if (args.verbose) console.log("Writing sample config to config.jsonc");
|
||||
export default function writeConfig(verbose: boolean) {
|
||||
if (verbose) console.log("Writing sample config to config.jsonc");
|
||||
writeFileSync(
|
||||
"./config.jsonc",
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
|
|
Reference in a new issue