Skip to content

Commit

Permalink
windows will not have deamon option
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Dec 12, 2023
1 parent 8633ae5 commit d5b2601
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions util/app-config/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,14 @@ pub fn get_bin_name_and_matches(version: &Version) -> (String, ArgMatches) {
}

fn run() -> Command {
Command::new(CMD_RUN)
let command = Command::new(CMD_RUN)
.about("Run CKB node")
.arg(
Arg::new(ARG_BA_ADVANCED)
.long(ARG_BA_ADVANCED)
.action(clap::ArgAction::SetTrue)
.help("Allow any block assembler code hash and args"),
)
.arg(
Arg::new(ARG_DAEMON)
.long(ARG_DAEMON)
.action(clap::ArgAction::SetTrue)
.help("Starts ckb as a daemon, \
which will run in the background and output logs to the specified log file"),
)
.arg(
Arg::new(ARG_SKIP_CHAIN_SPEC_CHECK)
.long(ARG_SKIP_CHAIN_SPEC_CHECK)
Expand Down Expand Up @@ -217,7 +210,19 @@ fn run() -> Command {
.long(ARG_INDEXER)
.action(clap::ArgAction::SetTrue)
.help("Start the built-in indexer service"),
)
);

#[cfg(not(target_os = "windows"))]
let command = command.arg(
Arg::new(ARG_DAEMON)
.long(ARG_DAEMON)
.action(clap::ArgAction::SetTrue)
.help(
"Starts ckb as a daemon, \
which will run in the background and output logs to the specified log file",
),
);
command
}

fn miner() -> Command {
Expand Down

0 comments on commit d5b2601

Please sign in to comment.