Document that variables are not exported to backticks in the same scope (#856)

This commit is contained in:
Casey Rodarmor 2021-06-04 12:57:26 -04:00 committed by GitHub
parent 28fdd36430
commit 1b30cceab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -899,6 +899,20 @@ test $RUST_BACKTRACE="1":
cargo test
```
Exported variables and parameters are not exported to backticks in the same scope.
```make
export FOO := "world"
# This backtick will fail with "WORLD: unbound variable"
BAR := `echo hello $WORLD`
```
```make
# Running `just a foo` will fail with "A: unbound varaible"
a $A $B=`echo $A`:
echo $A $B
```
=== Recipe Parameters
Recipes may have parameters. Here recipe `build` has a parameter called `target`: