refactor(scripts): add set -euo pipefail to all installer scripts

Add strict error handling to all scripts:
- 13 scripts get `set -euo pipefail`
- install-macos-defaults.sh gets `set -uo pipefail` (without -e) because
  defaults write commands may fail on newer macOS versions
- install-cargo-packages.sh: also add missing source of shared.sh
This commit is contained in:
2026-02-05 22:51:40 +02:00
parent e8725c4b47
commit de773ad68f
14 changed files with 17 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Create file containing key mappings for Neovim # @description Create file containing key mappings for Neovim
# Usage: ./create-nvim-keymaps.sh # Usage: ./create-nvim-keymaps.sh
# #

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install cargo/rust packages. # @description Install cargo/rust packages.
#
# shellcheck source=shared.sh
source "$DOTFILES/config/shared.sh"
msgr run "Starting to install rust/cargo packages" msgr run "Starting to install rust/cargo packages"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Update pure-bash-bible cheatsheets # @description Update pure-bash-bible cheatsheets
# shellcheck disable=SC2231,SC2034,SC2181,SC2068 # shellcheck disable=SC2231,SC2034,SC2181,SC2068
# shellcheck source=shared.sh # shellcheck source=shared.sh

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install PHP Package Manager Composer # @description Install PHP Package Manager Composer
# #
# shellcheck source="shared.sh" # shellcheck source="shared.sh"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install NerdFonts # @description Install NerdFonts
# #
# shellcheck source="shared.sh" # shellcheck source="shared.sh"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install GitHub CLI extensions # @description Install GitHub CLI extensions
# #
# shellcheck source="shared.sh" # shellcheck source="shared.sh"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install git-crypt # @description Install git-crypt
# #
# NOTE: Experimental, wip # NOTE: Experimental, wip

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install Go packages # @description Install Go packages
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -uo pipefail
# @description Sets macOS Defaults that I like # @description Sets macOS Defaults that I like
# #
# This script contains large portions from following scripts: # This script contains large portions from following scripts:

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install npm packages globally. # @description Install npm packages globally.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install ntfy # @description Install ntfy
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install Python packages using uv. # @description Install Python packages using uv.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install XCode CLI Tools with osascript magic. # @description Install XCode CLI Tools with osascript magic.
# Ismo Vuorinen <https://github.com/ivuorinen> 2018 # Ismo Vuorinen <https://github.com/ivuorinen> 2018
# #

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
# @description Install z # @description Install z
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh