Skip to content

Commit

Permalink
Actually force script generation if file already exists
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon committed Aug 8, 2022
1 parent 745e086 commit 35a9507
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wizards/templateExec.ts
Original file line number Diff line number Diff line change
@@ -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<JBangTemplate[]> {
const data = await executeCommand(jbang(), ["template", "list"], {
Expand Down Expand Up @@ -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
}

0 comments on commit 35a9507

Please sign in to comment.