Skip to content

Commit 9df7e7d

Browse files
authored
Rename flag to --skip-user-creation (#1696)
1 parent 2ef54aa commit 9df7e7d

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

install/parse-cli.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,32 @@ Options:
1616
upgrades.
1717
--skip-commit-check Skip the check for the latest commit when on the master
1818
branch of a \`self-hosted\` Git working copy.
19-
--skip-user-prompt Skip the initial user creation prompt (ideal for non-
19+
--skip-user-creation Skip the initial user creation prompt (ideal for non-
2020
interactive installs).
2121
EOF
2222
}
2323

24-
SKIP_USER_PROMPT="${SKIP_USER_PROMPT:-}"
24+
depwarn() {
25+
echo "WARNING The $1 is deprecated. Please use $2 instead."
26+
}
27+
28+
if [ ! -z "${SKIP_USER_PROMPT:-}" ]; then
29+
depwarn "SKIP_USER_PROMPT variable" "SKIP_USER_CREATION"
30+
SKIP_USER_CREATION="${SKIP_USER_PROMPT}"
31+
fi
32+
33+
SKIP_USER_CREATION="${SKIP_USER_CREATION:-}"
2534
MINIMIZE_DOWNTIME="${MINIMIZE_DOWNTIME:-}"
2635
SKIP_COMMIT_CHECK="${SKIP_COMMIT_CHECK:-}"
2736

2837
while (( $# )); do
2938
case "$1" in
3039
-h | --help) show_help; exit;;
31-
--no-user-prompt) SKIP_USER_PROMPT=1;; # deprecated
32-
--skip-user-prompt) SKIP_USER_PROMPT=1;;
40+
--no-user-prompt) SKIP_USER_CREATION=1;
41+
depwarn "--no-user-prompt flag" "--skip-user-creation";;
42+
--skip-user-prompt) SKIP_USER_CREATION=1;
43+
depwarn "--skip-user-prompt flag" "--skip-user-creation";;
44+
--skip-user-creation) SKIP_USER_CREATION=1;;
3345
--minimize-downtime) MINIMIZE_DOWNTIME=1;;
3446
--skip-commit-check) SKIP_COMMIT_CHECK=1;;
3547
--) ;;

install/set-up-and-migrate-database.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
echo "${_group}Setting up / migrating database ..."
22

3-
if [[ -n "${CI:-}" || "${SKIP_USER_PROMPT:-0}" == 1 ]]; then
3+
if [[ -n "${CI:-}" || "${SKIP_USER_CREATION:-0}" == 1 ]]; then
44
$dcr web upgrade --noinput
55
echo ""
6-
echo "Did not prompt for user creation due to non-interactive shell."
7-
echo "Run the following command to create one yourself (recommended):"
6+
echo "Did not prompt for user creation. Run the following command to create one"
7+
echo "yourself (recommended):"
88
echo ""
99
echo " $dc_base run --rm web createuser"
1010
echo ""

0 commit comments

Comments
 (0)