fix(dev.sh): bash 3.2 uyumlu lowercase — macOS'ta './dev.sh up' bad substitution ile açılmıyor#683
Merged
lilyshen0722 merged 1 commit intoJul 19, 2026
Conversation
…ile açılmıyordu
is_truthy_env_value() ${1,,} (bash 4+ expansion) kullanıyordu. macOS /bin/bash hâlâ
3.2.57 olduğu için './dev.sh up' runtime'da '${1,,}: bad substitution' verip çıkıyor,
backend hiç ayağa kalkmıyordu. Dosyadaki TEK bash4-izm buydu; tr ile taşınabilir hale
getirildi (shebang/PATH'e bağımlı değil, stock macOS'ta da çalışır).
Kanıt (bash 3.2.57):
- eski: ${1,,} -> 'bad substitution'
- yeni: TRUE/true/YES/On/1 -> truthy; false/NO/0/boş -> falsy (davranış korundu)
- bash -n dev.sh: parse OK
Not: '#!/usr/bin/env bash' yeterli DEĞİL — Homebrew bash'i olmayan makinede yine 3.2 bulunur.
lilyshen0722
approved these changes
Jul 19, 2026
lilyshen0722
left a comment
Contributor
There was a problem hiding this comment.
Confirmed: macOS ships bash 3.2 as /bin/bash and ${1,,} is bash-4+ — this was breaking './dev.sh up' on every clean Mac, which is our self-hosting front door. The tr fix is exactly right and the comment explains why it must stay portable. Thank you for catching what our own CI (Linux) structurally couldn't.
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.
Sorun
is_truthy_env_value()${1,,}(bash 4+ lowercase expansion) kullanıyor. macOS'un/bin/bash'i hâlâ 3.2.57 (Apple lisans nedeniyle güncellemiyor) vedev.shshebang'i#!/bin/bash. Sonuç: temiz bir macOS'ta./dev.sh upruntime'da${1,,}: bad substitutionverip çıkıyor, backend hiç ayağa kalkmıyor.Yeni bir makinede kurulum sırasında yakalandı (parse temiz olduğu için sadece
upyolunda, fonksiyon çağrılınca patlıyor — bu yüzden fark edilmemiş).Fix
Dosyadaki tek bash4-izm buydu (
grepile doğrulandı).trile taşınabilir hale getirildi.#!/usr/bin/env bashyeterli değil — Homebrew bash'i olmayan makinedeenvyine 3.2'yi bulur. Bu fix stock macOS bash'te de çalışır, PATH/shebang'e bağımlı değil.Kanıt (bash 3.2.57)