Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .docker/install-forum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ install_one() {
return 0
fi

# The installer checks every file against the manifest, and the entrypoint
# builds that manifest from the checkout only when there is none. One built
# before the checkout was last edited would fail the check, so a manifest
# that is not part of HEAD is removed here, from the index too if it was
# staged. When reset.sh restarts the container the entrypoint builds a fresh
# one, or leaves it absent on a dirty working tree, which a development
# version's installer accepts.
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 \
&& ! git cat-file -e HEAD:Sources/Maintenance/manifest.php 2>/dev/null; then
git rm -q --cached --ignore-unmatch Sources/Maintenance/manifest.php
rm -f Sources/Maintenance/manifest.php
fi

log "${smf_type}: resetting"
"$DOCKER_DIR/reset.sh" --engine "$smf_type" >/dev/null

Expand Down
10 changes: 8 additions & 2 deletions Sources/Maintenance/Tools/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ public function getStepTitle(): string
*/
public function welcome(): bool
{
// Done the submission?
if (isset($_POST['contbutt'])) {
// Done the submission? From the command line contbutt is passed with every
// run, so there it cannot mean the checks below were seen and passed.
if (isset($_POST['contbutt']) && !Sapi::isCLI()) {
// Does the admin want debug info?
$this->debug = isset($_POST['debug']);

Expand Down Expand Up @@ -362,6 +363,11 @@ public function welcome(): bool
Utils::$context['continue'] = true;
}

// There is no page to show on the command line, so carry on unless a check failed.
if (Sapi::isCLI()) {
return empty(Maintenance::$errors) && empty(Maintenance::$fatal_error);
}

return false;
}

Expand Down