Skip to content

Add multiple --environment-file args - #3805

Merged
stgraber merged 3 commits into
lxc:mainfrom
AJRepo:ajrepo_multiple_env_files
Aug 11, 2026
Merged

Add multiple --environment-file args#3805
stgraber merged 3 commits into
lxc:mainfrom
AJRepo:ajrepo_multiple_env_files

Conversation

@AJRepo

@AJRepo AJRepo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Allow the flag --environement-file to be called multiple times with different files as in:

incus launch images:debian/13 env-test
--environment-file test1.env
--environment-file test2.env

See Feature Request #3804

Signed-off-by: AJRepo AJRepo@users.noreply.github.com

@AJRepo
AJRepo requested a review from stgraber as a code owner August 9, 2026 18:15
@AJRepo

AJRepo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Tested and works. Here is the testing code:

$cat <<EOF > test1.env
FIRST_VAR=apple
SHARED_VAR=original_value
EOF

$cat <<EOF > test2.env
SECOND_VAR=banana
SHARED_VAR=overridden_value
EOF

$~/go/bin/incus launch images:debian/13 env-test \
  --environment-file test1.env \
  --environment-file test2.env
Launching env-test
Retrieving image: Unpacking image

$~/go/bin/incus config show env-test | grep environment
environment.FIRST_VAR: apple
environment.SECOND_VAR: banana
environment.SHARED_VAR: overridden_value

Comment thread cmd/incus/create.go Outdated
Comment thread cmd/incus/create.go Outdated
Comment thread cmd/incus/create.go Outdated
Comment thread cmd/incus/create.go Outdated
@AJRepo
AJRepo force-pushed the ajrepo_multiple_env_files branch 4 times, most recently from 470bb4d to cd45062 Compare August 10, 2026 16:30
@stgraber
stgraber force-pushed the ajrepo_multiple_env_files branch from cd45062 to 8b9f727 Compare August 10, 2026 21:45
AJRepo and others added 3 commits August 10, 2026 17:53
Signed-off-by: AJRepo <7245631+AJRepo@users.noreply.github.com>
Signed-off-by: AJRepo <7245631+AJRepo@users.noreply.github.com>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber
stgraber force-pushed the ajrepo_multiple_env_files branch from 8b9f727 to 73c471a Compare August 10, 2026 21:54
@stgraber stgraber changed the title Feature: Add multiple --environment-file args Add multiple --environment-file args Aug 10, 2026
@stgraber
stgraber merged commit 62fded5 into lxc:main Aug 11, 2026
196 of 203 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants