Best practice for executing multi-line shell scripts with tart exec without hanging #1141
-
|
Hello all, I've run into a specific issue and would appreciate some guidance on the recommended best practice. Goal: Problem: What I've Tried: My current approach is to build a helper function in my Jenkinsfile (Groovy) that takes a multi-line script block and executes it. Attempt: Chaining commands with My attempt was to join each line of the script with Here is an example of the final command that gets executed: tart exec my-vm-image zsh -c 'source /path/to/conanbuild.sh && cache -s && cache --show-log-stats'Syntactically, this command is correct. However, this is the version that hangs. My hypothesis is that something within the My Question: Is there a simpler or more idiomatic way to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can execute scripts simply by starting a shell remotely and piping the script contents: tart exec -i macos zsh < test.shExample: % cat test.sh
#!/bin/zsh
echo "first instruction"
echo "second instruction"% tart exec -i macos zsh < test.sh
first instruction
second instruction |
Beta Was this translation helpful? Give feedback.
You can execute scripts simply by starting a shell remotely and piping the script contents:
Example: