Skip to content

[PR #30] Default config path cwd-relative — breaks in Docker and non-root invocations #83

@obchain

Description

@obchain

PR: #30 (feat/05-clap-cli)
File: crates/charon-cli/src/main.rs
Line: ~22

Problem:

#[arg(long, short = 'c', default_value = "config/default.toml")]
config: PathBuf,

Resolves relative to process cwd at runtime. Hetzner Docker deploy (PR #55 compose stack) may have binary WORKDIR different from repo root, silently loading wrong file or emitting confusing relative-path error.

Fix: Remove default; require explicit flag or env var:

#[arg(long, short = 'c', env = "CHARON_CONFIG")]
config: PathBuf,

Forcing explicit config also prevents running with stale default in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p1-coreCore MVP scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions