From 1b30cceab848765c03756a8b05a9c931b147a060 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 4 Jun 2021 12:57:26 -0400 Subject: [PATCH] Document that variables are not exported to backticks in the same scope (#856) --- README.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.adoc b/README.adoc index 4048d19..5f05d0b 100644 --- a/README.adoc +++ b/README.adoc @@ -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`: