Closed arctic-hen7 closed 3 years ago
This is fine from the final schema's perspective, but Bones still uses an older variant of the schema with each stage being a different BonesCore
. Fixing this would require a change to that logic, but that'd be beneficial anyway. Then it'll be a matter of figuring out how to run multiple commands in the same shell.
I'll start work on this.
Okay, this will result in a syntax change. Users must now specify delimiters to use for multistage commands. The defaults will be &&
for all shells except PowerShell, which will use ;
. This also allows the customization of the behavior of multistage commands (e.g. you could use ||
instead in BASH to execute only if the previous command failed).
If that syntax is made optional though, with the reasonable default delimiter &&
(which works everywhere except Windows PowerShell I think), this can be a non-breaking change.
Describe the bug Any command with multiple stages will have each of its stages executed in a different subshell.
Minimum reproducible configuration
Expected behavior The above example should print
/tmp
as the current directory, assuming that the two stages run in the same shell.Actual behavior The above example will instead print the directory in which it was executed, as the commands run in different shells.
Runtime information Ubuntu 20.10, but this affects all systems.