From 35a9507296af48804de9f4d1c8193e4d584e65e5 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 8 Aug 2022 11:43:47 +0200 Subject: [PATCH] Actually force script generation if file already exists Signed-off-by: Fred Bricon --- src/wizards/templateExec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wizards/templateExec.ts b/src/wizards/templateExec.ts index a8acfaf..2c1aefe 100644 --- a/src/wizards/templateExec.ts +++ b/src/wizards/templateExec.ts @@ -1,8 +1,8 @@ -import { JBangTemplate } from "./JBangTemplate"; +import * as fs from "fs"; import { jbang } from "../JBangExec"; import { executeCommand } from "../utils/cpUtils"; +import { JBangTemplate } from "./JBangTemplate"; import { ScriptGenState } from "./wizardState"; -import * as fs from "fs"; export async function getTemplates(): Promise { const data = await executeCommand(jbang(), ["template", "list"], { @@ -48,6 +48,7 @@ function generateArgs(scriptGenState: ScriptGenState): string[] { args.push("-t"); args.push(scriptGenState.template); } + args.push("--force"); args.push(scriptGenState.scriptName); return args } \ No newline at end of file