Skip to content

Commit bc184a9

Browse files
short ciruit the loop if it's not executable (#427)
* short ciruit the loop if it's not executable * fix release drafter commitish
1 parent 2cfea4a commit bc184a9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/release-drafter.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
# Drafts your next Release notes as Pull Requests are merged into "master"
4848
- uses: release-drafter/release-drafter@v6
4949
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
50-
# with:
50+
with:
51+
commitish: master
5152
# config-name: my-config.yml
5253
# disable-autolabeler: true
5354
env:

libexec/goenv-commands

+6-5
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ shopt -s nullglob
3737

3838
for path in "${paths[@]}"; do
3939
for command in "${path}/goenv-"*; do
40-
command="${command##*goenv-}"
40+
[ -x "$command" ] || continue
41+
command="${command##*/goenv-}"
4142
if [ -n "$sh" ]; then
42-
if [ ${command:0:3} = "sh-" ]; then
43-
echo ${command##sh-}
43+
if [ ${command:0:3} == "sh-" ]; then
44+
echo "${command##sh-}"
4445
fi
4546
elif [ -n "$nosh" ]; then
4647
if [ ${command:0:3} != "sh-" ]; then
47-
echo ${command##sh-}
48+
echo "${command##sh-}"
4849
fi
4950
else
50-
echo ${command##sh-}
51+
echo "${command##sh-}"
5152
fi
5253
done
5354
done

0 commit comments

Comments
 (0)