Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tasks/install_puppetserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

parse_platform() {
data=()
for x in $(echo $1 | tr "[/|-|-|:]" "\n")

Check warning on line 24 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:24:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check warning on line 24 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Don't use [] around classes in tr, it replaces literal square brackets. Raw Output: ./tasks/install_puppetserver.sh:24:27: info: Don't use [] around classes in tr, it replaces literal square brackets. (ShellCheck.SC2021)
do
data+=("$x")
done
Expand Down Expand Up @@ -59,9 +59,9 @@
}

fetch_collection() {
data=$(echo $1 | tr "-" "\n")

Check warning on line 62 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Variable was used as an array but is now assigned a string. Raw Output: ./tasks/install_puppetserver.sh:62:3: warning: Variable was used as an array but is now assigned a string. (ShellCheck.SC2178)

Check warning on line 62 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:62:15: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
myarr=()
for x in $(echo $1 | tr "-" "\n")

Check warning on line 64 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:64:19: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
do
myarr+=("$x")
done
Expand Down Expand Up @@ -94,20 +94,22 @@
"18.04") codename="bionic";;
"2004") codename="focal";;
"20.04") codename="focal";;
"2204") codename="jammy";;
"22.04") codename="jammy";;
*) codename="unsupported"
esac
echo $codename
}

run_cmd() {
eval $1

Check warning on line 105 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:105:8: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
rc=$?

if test $rc -ne 0; then
attempt_number=0
while test $attempt_number -lt $retry; do

Check warning on line 110 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:110:36: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
echo "Retrying... [$((attempt_number + 1))/$retry]"
eval $1

Check warning on line 112 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:112:12: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
rc=$?

if test $rc -eq 0; then
Expand All @@ -133,8 +135,8 @@
exit 1
fi

osname=$(parse_platform $platform "osname")

Check warning on line 138 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:138:25: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
major_version=$(parse_platform $platform "majorversion")

Check warning on line 139 in tasks/install_puppetserver.sh

View workflow job for this annotation

GitHub Actions / Spec / Spec tests (Puppet: ~> 8.0, Ruby Ver: 3.2)

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./tasks/install_puppetserver.sh:139:32: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
osfamily=$(fetch_osfamily $osname)
collection=$(fetch_collection $collection)

Expand Down
Loading