-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(env): supports glob patterns in
env._.file
and env._.source
(f…
- Loading branch information
1 parent
11d6f71
commit b08c5cc
Showing
5 changed files
with
87 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ Library | |
/pyproject.toml | ||
/poetry.lock | ||
/test-e2e/ | ||
env.d | ||
source.d |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
# shellcheck source-path=SCRIPTDIR | ||
source "$(dirname "$0")/assert.sh" | ||
|
||
cat >.e2e.mise.toml <<EOF | ||
[env] | ||
_.file = "env.d/*.env" | ||
EOF | ||
|
||
mkdir -p env.d | ||
|
||
echo "VAR1=1" >env.d/1.env | ||
echo "VAR2=2" >env.d/2.env | ||
|
||
# mise trust --verbose | ||
mise env -s bash | ||
assert_contains "mise env -s bash" "VAR1=1" | ||
assert_contains "mise env -s bash" "VAR2=2" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
# shellcheck source-path=SCRIPTDIR | ||
source "$(dirname "$0")/assert.sh" | ||
|
||
export MISE_EXPERIMENTAL=1 | ||
|
||
cat >.e2e.mise.toml <<EOF | ||
[env] | ||
_.source = "source.d/*.sh" | ||
EOF | ||
|
||
mkdir -p source.d | ||
|
||
cat >source.d/1.sh <<EOF | ||
#!/usr/bin/env bash | ||
export SOURCE1=1 | ||
EOF | ||
|
||
cat >source.d/2.sh <<EOF | ||
#!/usr/bin/env bash | ||
export SOURCE2=2 | ||
EOF | ||
|
||
assert_contains "mise env -s bash" "SOURCE1=1" | ||
assert_contains "mise env -s bash" "SOURCE2=2" |
This file contains 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
This file contains 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