Skip to content

Commit 41c6765

Browse files
committed
Verify run script using shellcheck
1 parent 394db01 commit 41c6765

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
image: koalaman/shellcheck-alpine:stable
2+
3+
shellcheck-run:
4+
stage: test
5+
script:
6+
- shellcheck --version
7+
- shellcheck --color=always ./run

run

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/with-contenv bashio
2+
# shellcheck shell=bash
23

34
USER="homeassistant"
45
GROUP="$USER"
@@ -56,7 +57,7 @@ if [ -n "${EXTRA_GID:-}" ]; then
5657
supplementary_groups+=( "$group" )
5758
done
5859

59-
bashio::log.info "Appending supplementary groups: ${supplementary_groups[@]}"
60+
bashio::log.info "Appending supplementary groups: ${supplementary_groups[*]}"
6061
for group in "${supplementary_groups[@]}"; do
6162
addgroup "$USER" "$group"
6263
done
@@ -95,10 +96,12 @@ fi
9596
#
9697

9798
bashio::log.info "Activating venv"
99+
# shellcheck source=/dev/null
98100
. "$VENV_PATH/bin/activate"
99101

100102
bashio::log.info "Setting new \$HOME"
101-
export HOME="$( getent passwd "$USER" | cut -d: -f6 )"
103+
HOME="$( getent passwd "$USER" | cut -d: -f6 )"
104+
export HOME
102105

103106
# Everything below should be kept in sync with upstream's
104107
# https://github.com/home-assistant/core/blob/dev/rootfs/etc/services.d/home-assistant/run

0 commit comments

Comments
 (0)