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
Describe the bug
Any command with multiple stages will have each of its stages executed in a different subshell.
Minimum reproducible configuration
version = "0.3.0"
[scripts]
test = [ "cd /tmp", "pwd" ]
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.
The text was updated successfully, but these errors were encountered:
arctic-hen7
added
bug
Something isn't working
triage
This issue needs to be examined by a maintainer
and removed
triage
This issue needs to be examined by a maintainer
labels
Jul 9, 2021
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.
arctic-hen7
changed the title
Multistage commands run each stage ina different shell
Multistage commands run each stage in a different shell
Jul 9, 2021
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.
The text was updated successfully, but these errors were encountered: