-
-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.
Description
Problem: Running into mvdan/sh#1099, see https://github.com/go-task/task/blob/v3.39.2/go.mod#L26
Request: mvdan/sh should be downgraded to 3.8.0
Example taskfile:
version: "3"
tasks:
embedded-hang:
cmds:
- cmd: |
set -x
while read -r line; do
echo "$line"
done < <(echo "hi file substitution")
echo done
use-script:
cmds:
- cmd: |
cat <<EOF> read.sh
#!/bin/bash
set -x
while read -r line; do
echo "$line"
done < <(echo "hi file substitution")
echo done
EOF
chmod +x read.sh
./read.shHangs when using gosh:
❯ task embedded-hang
task: [embedded-hang] set -x
while read -r line; do
echo "$line"
done < <(echo "hi file substitution")
echo done
+ echo 'hi file substitution'
+ read '-r line'
+ echo 'hi file substitution'
hi file substitution
+ read '-r line'
^Ctask: Signal received: "interrupt"
^Ctask: Signal received: "interrupt"
^Ctask: Signal received for the third time: "interrupt". Forcing shutdown
/private/tmp/task took 4s
Sanity check, writing same script to disk and running it directly works as expected
❯ task use-script
task: [use-script] cat <<EOF> read.sh
#!/bin/bash
set -x
while read -r line; do
echo "$line"
done < <(echo "hi file substitution")
echo done
EOF
chmod +x read.sh
./read.sh
+ read -r line
++ echo 'hi file substitution'
+ echo ''
+ read -r line
+ echo done
done
- Task version: v3.39.2
- Operating system: macos
- Experiments enabled:
siku4 and andrewimeson
Metadata
Metadata
Assignees
Labels
dep: mvdan/shIssues related to the upstream interpreter used by Task.Issues related to the upstream interpreter used by Task.