Conversation
Currently a simple ``` singularity exec /cvmfs/eic.opensciencegrid.org/singularity/eicweb/eic_xl:26.07.1-stable eicrecon test.edm4hep.root ``` fails with ``` ERROR: file: /opt/software/linux-x86_64_v2/epic-26.07.1-uzwreubimqduvctpoysj5wmbj6ay5emu/share/epic/eicrecon.xml does not exist! Check that your DETECTOR_PATH and DETECTOR_CONFIG environment variables are set correctly. ``` i.e. eicrecon is passed as $1 and is used by entrypoint.sh as the command to exec and by thisepic.sh to set DETECTOR_CONFIG. This will source thisepic.sh in such a way that no detector config is set.
|
Tested using |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The wrapper correctly isolates positional parameters while preserving existing detector initialization behavior.
Review effort: Lite
Findings: None
What changed in this PR
Prevents container command arguments from being interpreted as detector configuration when sourcing thisepic.sh.
Changes:
- Adds a wrapper that clears positional arguments before sourcing.
- Uses the wrapper for automatic EPIC environment initialization.
| File | Description |
|---|---|
containers/eic/profile.d/z21_epic_main.sh |
Prevents $1 propagation into thisepic.sh. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
How does this change behavior of |
Don't see a problem: |
Currently a simple
fails with
i.e. eicrecon is passed as $1 and is used by entrypoint.sh as the command to exec and by thisepic.sh to set DETECTOR_CONFIG.
This will source thisepic.sh in such a way that no detector config is set.