Skip to content
Snippets Groups Projects
Commit 251bb84a authored by Éloïs's avatar Éloïs
Browse files

feat(cli): re-expose node option --max-old-space-size

parent ddb37987
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ pub(crate) fn gen_duniter_ts_args(
duniter_js_exe: String,
log_level_filter: log::LevelFilter,
) -> Vec<String> {
let mut duniter_ts_args = vec!["--max-old-space-size=4096".to_owned(), duniter_js_exe];
let max_old_space_size = args.max_old_space_size.unwrap_or(4096);
let mut duniter_ts_args = vec![
format!("--max-old-space-size={}", max_old_space_size),
duniter_js_exe,
];
if let Some(ref home) = args.home {
duniter_ts_args.push("--home".to_owned());
duniter_ts_args.push(home.to_str().expect("invalid home path").to_owned());
......
......@@ -64,6 +64,8 @@ struct DuniterArgs {
/// Logs level (If not specified, use the logs level defined in the configuration or INFO by default).
#[structopt(short, long, alias("loglevel"), case_insensitive(true), possible_values = &["OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"])]
log: Option<log::LevelFilter>,
#[structopt(long, hidden = true)]
max_old_space_size: Option<usize>,
/// Profile name (default "duniter_default")
#[structopt(short, long, alias("mdb"))]
profile: Option<String>,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment