Skip to content

Commit

Permalink
fix cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Dec 26, 2023
1 parent 44cc345 commit b81972e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ckb-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repository = "https://github.com/nervosnetwork/ckb"

[dependencies]
clap = { version = "4" }
daemonize = { version = "0.5.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
serde_plain = "0.3.0"
Expand Down Expand Up @@ -46,7 +45,9 @@ sentry = { version = "0.26.0", optional = true }
is-terminal = "0.4.7"
fdlimit = "0.2.1"
ckb-stop-handler = { path = "../util/stop-handler", version = "= 0.114.0-pre" }

[target.'cfg(not(target_os="windows"))'.dependencies]
daemonize = { version = "0.5.0" }
nix = { version = "0.24.0", default-features = false, features = ["signal"] }
colored = "2.0"

Expand Down
6 changes: 4 additions & 2 deletions ckb-bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use ckb_build_info::Version;
use ckb_logger::{debug, info};
use ckb_network::tokio;
use clap::ArgMatches;
use colored::Colorize;
use daemonize::Daemonize;
use helper::raise_fd_limit;
use setup_guard::SetupGuard;

use colored::Colorize;
#[cfg(not(target_os = "windows"))]
use daemonize::Daemonize;
use subcommand::check_process;

#[cfg(feature = "with_sentry")]
Expand Down Expand Up @@ -63,13 +63,15 @@ pub fn run_app(version: Version) -> Result<(), ExitCode> {
.expect("SubcommandRequiredElseHelp");

if run_deamon(cmd, matches) {
#[cfg(not(target_os = "windows"))]
run_app_in_daemon(version, bin_name, cmd, matches)
} else {
debug!("ckb version: {}", version);
run_app_inner(version, bin_name, cmd, matches)
}
}

#[cfg(not(target_os = "windows"))]
fn run_app_in_daemon(
version: Version,
bin_name: String,
Expand Down

0 comments on commit b81972e

Please sign in to comment.