Skip to content

Commit 469531d

Browse files
committed
Rename commander to program
1 parent a1aa618 commit 469531d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
import { CCKey } from "codechain-keystore";
4-
import * as commander from "commander";
4+
import * as program from "commander";
55
import * as _ from "lodash";
66
import * as process from "process";
77

@@ -11,7 +11,7 @@ import { listKeys } from "./command/list";
1111
import { CLIError, CLIErrorType } from "./error";
1212
import { AccountType, Option } from "./types";
1313

14-
commander
14+
program
1515
.version("0.1.1")
1616
.arguments("[action]")
1717
.option(
@@ -22,7 +22,7 @@ commander
2222
.option("-a --address <address>", "address")
2323
.action(main);
2424

25-
commander.on("--help", () => {
25+
program.on("--help", () => {
2626
console.log(` Action:
2727
2828
list : List all the saved addresses
@@ -42,7 +42,7 @@ commander.on("--help", () => {
4242

4343
async function main(action: string, option: Option) {
4444
if (!action) {
45-
commander.outputHelp();
45+
program.outputHelp();
4646
process.exit(1);
4747
return;
4848
}
@@ -71,7 +71,7 @@ async function main(action: string, option: Option) {
7171
}
7272
}
7373

74-
commander.parse(process.argv);
74+
program.parse(process.argv);
7575

7676
function getAccountType(option: Option): AccountType {
7777
const accountType = option.accountType;

0 commit comments

Comments
 (0)