Skip to content

Commit

Permalink
Add safe mode flag to args variable
Browse files Browse the repository at this point in the history
Add safe mode flag to args variable to enable safe mode in Loz
command handling.

Generated by gpt-3.5-turbo
  • Loading branch information
joone committed Mar 22, 2024
1 parent faea2c6 commit fb9ec7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const args = yargs
.help()
.parseSync();

if (LOZ_SAFE) args.safe = true;

const loz = new Loz();

async function handleLozCommand(): Promise<void> {
Expand Down Expand Up @@ -122,7 +124,6 @@ async function handleInputFromPipe(prompt: any): Promise<void> {

(async () => {
await loz.init();
if (LOZ_SAFE) args.safe = true;
if (args.safe) loz.enableSafe();
await handleLozCommand();
loz.close();
Expand Down

0 comments on commit fb9ec7b

Please sign in to comment.