Shell script hardening: set -euo pipefail across all scripts#40
Draft
Copilot wants to merge 3 commits into
Draft
Shell script hardening: set -euo pipefail across all scripts#40Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/florianajir/pi-web/sessions/0800baa2-fee6-4094-acfe-8a5ce8e5fc44 Co-authored-by: florianajir <3715903+florianajir@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update scripts to use set -euo pipefail for safety
Shell script hardening: set -euo pipefail across all scripts
Mar 27, 2026
Owner
|
@copilot test failed fix it |
Agent-Logs-Url: https://github.com/florianajir/pi-web/sessions/ad822797-f7d0-4053-bace-a8d4d5f7a25b Co-authored-by: florianajir <3715903+florianajir@users.noreply.github.com>
Contributor
Author
florianajir
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scripts used only
set -e, leaving unset variable references silently expanding to empty strings and pipe failures going undetected — both dangerous when handling secrets or rendering configs.Changes
#!/bin/sh→#!/bin/bashon all scripts — required sincepipefailis a bash extension unavailable in POSIX sh/dashset -e/set -eu→set -euo pipefailacross all 17 scripts inscripts/andconfig/postgres/init-databases.shlib.sh: changedsh "$pre_start_script"→"$pre_start_script"— explicitshinvocation bypasses the shebang, running under dash and silently droppingpipefail📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.