Skip to content

Commit

Permalink
fix: raw mode warn
Browse files Browse the repository at this point in the history
  • Loading branch information
x-ray-s committed May 16, 2024
1 parent e6a9b7b commit 9cf4b9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "2fa-cmd",
"version": "0.0.5",
"version": "0.0.6",
"description": "A command tool for Google Authenticator",
"author": "x-ray-s",
"email": "princesswar721@gmail.com",
Expand Down
13 changes: 9 additions & 4 deletions source/cli.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const cli = meow(
const setError = (msg: string) => {
console.log(chalk.red(msg));
};

let clear = () => {};

(async function () {
const {name, secret, url, token} = cli.flags;

Expand Down Expand Up @@ -148,10 +151,12 @@ const setError = (msg: string) => {
console.log(generate(item.secret).token);
return process.exit(0);
}
})();

const {clear} = render(<App />, {
exitOnCtrlC: false,
});
const {clear: _clear} = render(<App />, {
exitOnCtrlC: false,
});

clear = _clear;
})();

export {clear};

0 comments on commit 9cf4b9e

Please sign in to comment.