3 Commits

Author SHA1 Message Date
Sri Harsha Ponukumati
d2379b2701 chore(install): quote vars and defensive programming (#13840) 2026-06-26 17:07:51 +02:00
Lixin2026
ff1df9a039 docs: formatting (#13830) 2026-06-25 12:23:42 +02:00
dependabot[bot]
639b566f0e chore(deps): bump actions/checkout from 6.0.3 to 7.0.0 (#13832)
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-25 09:36:20 +02:00
6 changed files with 11 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ jobs:
egress-policy: audit
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Authenticate as @ohmyzsh

View File

@@ -31,7 +31,7 @@ jobs:
egress-policy: audit
- name: Set up git repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
@@ -52,7 +52,7 @@ jobs:
egress-policy: audit
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Vercel CLI
run: npm install -g vercel
- name: Setup project and deploy

View File

@@ -29,7 +29,7 @@ jobs:
egress-policy: audit
- name: Set up git repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install zsh
run: sudo apt-get update; sudo apt-get install zsh
- name: Check syntax

View File

@@ -41,7 +41,7 @@ jobs:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

View File

@@ -51,7 +51,7 @@ USER=${USER:-$(id -u -n)}
# POSIX: https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html#tag_08_03
HOME="${HOME:-$(getent passwd $USER 2>/dev/null | cut -d: -f6)}"
# macOS does not have getent, but this works even if $HOME is unset
HOME="${HOME:-$(eval echo ~$USER)}"
HOME="${HOME:-$(eval echo ~"$USER")}"
# Track if $ZSH was provided
@@ -344,7 +344,7 @@ setup_zshrc() {
return
fi
if [ $OVERWRITE_CONFIRMATION != "no" ]; then
if [ "$OVERWRITE_CONFIRMATION" != "no" ]; then
# Ask user for confirmation before backing up and overwriting
echo "${FMT_YELLOW}Found ${zdot}/.zshrc."
echo "The existing .zshrc will be backed up to .zshrc.pre-oh-my-zsh if overwritten."
@@ -475,12 +475,14 @@ EOF
if user_can_sudo; then
sudo -k >/dev/null 2>&1 || true # -k forces the password prompt when supported
sudo chsh -s "$zsh" "$USER"
chsh_status=$?
else
chsh -s "$zsh" "$USER" # run chsh normally
chsh_status=$?
fi
# Check if the shell change was successful
if [ $? -ne 0 ]; then
if [ "$chsh_status" -ne 0 ]; then
fmt_error "chsh command unsuccessful. Change your default shell manually."
else
export SHELL="$zsh"