bob icon indicating copy to clipboard operation
bob copied to clipboard

Handling environment for multiline cmds

Open zuzuleinen opened this issue 2 years ago • 0 comments

"I got a bit confused by the outcome of this command in bob. From a users perspective I would assume both outputs to be "test". But all defined variables are reset between lines." - feedback from Daniel

unknown

Other examples

Running bob build with bellow bobfile we notice that FOO is not available in the build cmd

build:
  build:
    cmd: 
      echo $FOO
    dependsOn:
      - changer
  changer:
    cmd: export FOO="hello"
build:
  build:
    cmd: |
      export FOO="hello"
      echo $FOO

Todo

Discuss what needs to be done and apply a fix if nedeed.

zuzuleinen avatar Nov 01 '22 13:11 zuzuleinen