Skip to content

Commit

Permalink
Merge pull request #26 from Automattic/fix/mailpit-sc
Browse files Browse the repository at this point in the history
fix(mailpit): Fix issues found by ShellCheck
  • Loading branch information
sjinks authored Apr 11, 2023
2 parents d6bc96b + db6c796 commit b3dd39d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/src/mailpit/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "mailpit",
"name": "Mailpit",
"description": "Sets up Mailpit into the Dev Environment",
"version": "1.0.0",
"version": "1.0.1",
"options": {
"enabled": {
"type": "boolean",
Expand Down
4 changes: 3 additions & 1 deletion features/src/mailpit/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

if [ "$(id -u)" -ne 0 ]; then
if [ "$(id -u || true)" -ne 0 ]; then
echo 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
fi
Expand All @@ -15,6 +15,8 @@ else
MAILPIT_USER="${_REMOTE_USER}"
fi

: "${ENABLED:=}"

if [ "${ENABLED}" = "true" ]; then
echo '(*) Installing MailHog...'

Expand Down

0 comments on commit b3dd39d

Please sign in to comment.