Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29be359

Browse files
authored
Clarify wording of install.sh --dry-run output (#2751)
1 parent 6ad0f31 commit 29be359

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

install.sh

+24
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ echo_latest_version() {
8484
}
8585

8686
echo_standalone_postinstall() {
87+
if [ "${DRY_RUN-}" ]; then
88+
echo_dryrun_postinstall
89+
return
90+
fi
91+
8792
cath <<EOF
8893
8994
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/bin/$STANDALONE_BINARY_NAME
@@ -105,6 +110,11 @@ EOF
105110
}
106111

107112
echo_systemd_postinstall() {
113+
if [ "${DRY_RUN-}" ]; then
114+
echo_dryrun_postinstall
115+
return
116+
fi
117+
108118
echoh
109119
cath <<EOF
110120
$1 package has been installed.
@@ -125,6 +135,15 @@ Or, just run the server directly:
125135
EOF
126136
}
127137

138+
echo_dryrun_postinstall() {
139+
cath <<EOF
140+
141+
Dry-run complete.
142+
143+
To install Coder, re-run this script without the --dry-run flag.
144+
EOF
145+
}
146+
128147
main() {
129148
if [ "${TRACE-}" ]; then
130149
set -x
@@ -241,6 +260,11 @@ main() {
241260

242261
distro_name
243262

263+
if [ "${DRY_RUN-}" ]; then
264+
echoh "Running with --dry-run; the following are the commands that would be run if this were a real installation:"
265+
echoh
266+
fi
267+
244268
# Standalone installs by pulling pre-built releases from GitHub.
245269
if [ "$METHOD" = standalone ]; then
246270
if has_standalone; then

0 commit comments

Comments
 (0)