fix(issue-26): the wrapper reads .mam.env through the Python loader's parser, never source
- lib_py/delegation/envfile.py (stdlib only) holds the one set of rules: comments and blank lines skipped, key and value stripped, one matching quote pair removed, no shell interpretation, keys must match ^[A-Za-z_][A-Za-z0-9_]*$ (bad or `=`-less lines warn with the line number, never the value). - mqtt_common._parse_env_file delegates to envfile.apply. - The delegate-job wrapper runs envfile.py --shell by path and evals the shlex-quoted exports; values never reach a command line. The environment now wins over the file in both loaders. - .mam.env.example: commented assignments no longer use $HOME, which the parser keeps literally. The shell parsed the env file in one place only (wrapper :38), not three. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e1eb22bd59
commit
f1331d36ce
5 files changed
+345
-19
No files matched your search
+4
-4
@@ -29,11 +29,11 @@
|
||||
|
||||
# Root directory that holds Claude Code per-project conversation logs (*.jsonl).
|
||||
#default: $HOME/.claude/projects
|
||||
# CLAUDE_PROJECT_DIR=$HOME/.claude/projects
|
||||
# CLAUDE_PROJECT_DIR=/home/you/.claude/projects
|
||||
|
||||
# Directory scanned for per-session launcher wrappers (~/.local/bin/<session>).
|
||||
#default: $HOME/.local/bin
|
||||
# LOCAL_BIN=$HOME/.local/bin
|
||||
# LOCAL_BIN=/home/you/.local/bin
|
||||
|
||||
# Isolated Herdr session socket name (`herdr --session <name>`).
|
||||
#default: mam-<workspace-slug>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
# Path to the Herdr Unix domain socket.
|
||||
#default: $HOME/.config/herdr/herdr.sock
|
||||
# HERDR_SOCKET_PATH=$HOME/.config/herdr/herdr.sock
|
||||
# HERDR_SOCKET_PATH=/home/you/.config/herdr/herdr.sock
|
||||
|
||||
# Explicit Herdr workspace scope identifier (`herdr pane list --workspace <id>`).
|
||||
# Hard filters pane/agent resolution to this workspace. When unset, falls back
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
# Optional override for Codex CLI state / session directory.
|
||||
#default: $HOME/.codex
|
||||
# CODEX_HOME=$HOME/.codex
|
||||
# CODEX_HOME=/home/you/.codex
|
||||
|
||||
# Optional inline JSON permissions configuration for OpenCode.
|
||||
#default: (unset → defaults to --auto CLI bypass)
|
||||
|
||||
Reference in new issue
Block a user