You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo make -p test hello
cargo make -p prod hello
cargo make -p devel hello
Expected behavior
cargo-make prints :
$ cargo make -p test hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: test
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=${VAR2}" "VAR2=${VAR2}"
VAR1=${VAR2} VAR2=${VAR2}
[cargo-make] INFO - Build Done in 0.14 seconds.
$ cargo make -p prod hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: prod
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=2" "VAR2=2"
VAR1=2 VAR2=2
[cargo-make] INFO - Build Done in 0.13 seconds.
$ cargo make -p devel hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: devel
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=3" "VAR2=3"
VAR1=3 VAR2=3
[cargo-make] INFO - Build Done in 0.13 seconds.
Actual behavior
cargo-make prints :
$ cargo make -p test hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: test
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=${VAR2}" "VAR2=${VAR2}"
VAR1=${VAR2} VAR2=${VAR2}
[cargo-make] INFO - Build Done in 0.14 seconds.
$ cargo make -p prod hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: prod
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=${VAR2}" "VAR2=2"
VAR1=${VAR2} VAR2=2
[cargo-make] INFO - Build Done in 0.13 seconds.
$ cargo make -p devel hello
[cargo-make] INFO - cargo make 0.37.4
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: hello
[cargo-make] INFO - Profile: devel
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "echo" "VAR1=${VAR2}" "VAR2=3"
VAR1=${VAR2} VAR2=3
[cargo-make] INFO - Build Done in 0.13 seconds.
Related issue
I can open another issue if you want, but maybe this is related to the same thing. The first example in the same section of the README works unless you use the ${VAR:} syntax like so :
[env]
VAR1="${VAR2:}"VAR2=2
The text was updated successfully, but these errors were encountered:
I'll check it. i have to admit, i can't remember how this works as this changed so many times.
however, i don't remember ever having or documenting ${VAR:} as supported
@stormshield-guillaumed that place calls envmnt which is another lib of mine and there i do have some support for it (forgot about it).
and the support there is for ${var:some default} and can't remember if i supported empty strings.
The substitution by the empty string when the variable is unset seems to work, it just breaks the reordering of variables.
As for the first problem, I didn't took the time to dig the code to try to find the problem, did you had time ?
Describe The Bug
Unlike what is written here in the README, variable evaluation doesn't seem to be reordered with profiles.
To Reproduce
Assuming you have
cargo-make 0.37.4
installed, use thisMakefile.toml
:And use those commands :
cargo make -p test hello cargo make -p prod hello cargo make -p devel hello
Expected behavior
cargo-make
prints :Actual behavior
cargo-make
prints :Related issue
I can open another issue if you want, but maybe this is related to the same thing. The first example in the same section of the README works unless you use the
${VAR:}
syntax like so :The text was updated successfully, but these errors were encountered: