Skip to content
This repository was archived by the owner on Sep 17, 2026. It is now read-only.
This repository was archived by the owner on Sep 17, 2026. It is now read-only.

Bash "safe mode" in upgrade_mattermost.sh is broken #9082

Closed

Description

@eric-j-ason

# Immediately exit if a command run from a loop, a pipeline or a compound
# command statement fails or a variable is used unset.
set -o errexit nounset

To match the comment, the actual command should be like this:

set -o errexit -o nounset -o pipefail

This makes nounset actually take effect, and enables the pipe failure thing.

Activity

  1. esethna commented on Sep 14, 2026

    @esethna
    Contributor

    Bulk closing issues as our docs have migrated to the /mattermost repository. Please considering opening your issue or PR there if it is still valid.

  2. eric-j-ason commented on Sep 14, 2026

    @eric-j-ason
    Author

    @esethna: Was the file in question (upgrade_mattermost.sh) ever migrated along with the docs? I can't find it in the other repo.

  3. esethna commented on Sep 15, 2026

    @esethna
    Contributor

    @eric-j-ason looks like it might have been skipped as it doesn't appear in the sidebar table of contents in docs.mattermost.com. Can you tell me how you navigated to it and how you use this file?

  4. eric-j-ason commented on Sep 16, 2026

    @eric-j-ason
    Author

    If you mean how I first found the file, I don't recall. Probably, I searched for recommended ways to upgrade the Mattermost server. Is there a newer recommendation for how to do it?

    I use it as part of an automated upgrade procedure. I discovered the bug when an upgrade silently failed due to some command in the script failing, but the script continuing on as if all was fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions