fix: robust Exegol container detection (no stale pinning)#8
Merged
Conversation
…p pinning EXEGOL_CONTAINER
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A stale
EXEGOL_CONTAINERin~/.config/dotenvsec/config(e.g. a removed container) short-circuited auto-detection (if [[ -z … ]]), sodotsec exegolfailed with "No such container". The value also got pinned per-engagement, propagating the stale name.Fix
__dotsec_load_globalnow re-detects whenEXEGOL_CONTAINERis unset or the configured container doesn't exist (docker container inspect), preferring a running container (then any). A dead value never sticks.config/global-defaults: no longer pinsEXEGOL_CONTAINER(commented → auto-detect by default).cmd_new: stop reinjectingEXEGOL_CONTAINERinto the engagement.env— it's global infra, not per-engagement (the oldsedtargetedexegol-default, which never matched anyway — dead code removed).Test Plan
make test— 61/61 (new: re-detects when configured container is gone, via docker stub)make lint— shellcheck clean