-
-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added `env._.source` feature * Commit from GitHub Actions (test) --------- Co-authored-by: mise[bot] <[email protected]>
- Loading branch information
1 parent
76f38ca
commit 00b756a
Showing
3 changed files
with
44 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
# shellcheck source-path=SCRIPTDIR | ||
source "$(dirname "$0")/assert.sh" | ||
|
||
export MISE_EXPERIMENTAL=1 | ||
|
||
mkdir -p "$(dirname "$MISE_GLOBAL_CONFIG_FILE")" "$MISE_CONFIG_DIR" | ||
|
||
cat >"$MISE_GLOBAL_CONFIG_FILE" <<EOF | ||
[env] | ||
_.source = "{{ env.MISE_CONFIG_DIR }}/source.sh" | ||
EOF | ||
|
||
cat >"$MISE_CONFIG_DIR/source.sh" <<EOF | ||
#!/usr/bin/env bash | ||
export MISE_TEST_SOURCE=1234 | ||
EOF | ||
|
||
assert_contains "mise env -s bash" "export MISE_TEST_SOURCE=1234" |
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