Skip to content

Commit d78791c

Browse files
committed
Provide instructions for removing bundled plugin clone config
We will soon start bundling many more plugins in Discourse core, which means that existing `git clone` lines in container YAMLs will need to be removed. This commit adds a more informative message for this situation.
1 parent a382cb1 commit d78791c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

launcher

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ usage () {
2323
exit 1
2424
}
2525

26+
BUNDLED_PLUGINS=(
27+
"discourse-reactions"
28+
)
29+
2630
# for potential re-exec later
2731
SAVED_ARGV=("$@")
2832

@@ -481,6 +485,20 @@ RUBY
481485
merge_user_args
482486
}
483487

488+
# Temporary helper to provide a more useful error message when a bundled plugin is still referenced in the config file.
489+
explain_bundled_plugin_error() {
490+
config_data=$(cat $config_file)
491+
for plugin in "${BUNDLED_PLUGINS[@]}"; do
492+
if [[ $config_data =~ "git clone https://github.com/discourse/$plugin" ]]; then
493+
echo "---"
494+
echo "HINT: The plugin '$plugin' is now bundled with Discourse and should not be included in your container configuration."
495+
echo "Remove the line 'git clone https://github.com/discourse/$plugin' from your $config_file file, then try again."
496+
echo "For more information, see https://meta.discourse.org/t/373574"
497+
echo "---"
498+
fi
499+
done
500+
}
501+
484502
if [ -z $docker_path ]; then
485503
install_docker
486504
fi
@@ -706,6 +724,7 @@ run_bootstrap() {
706724
exit 77
707725
elif [[ $BOOTSTRAP_EXITCODE -gt 0 ]]; then
708726
echo "bootstrap failed with exit code $BOOTSTRAP_EXITCODE"
727+
explain_bundled_plugin_error
709728
echo "** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one."
710729
echo "./discourse-doctor may help diagnose the problem."
711730

0 commit comments

Comments
 (0)