Getcaddy.com bash script gives an error

I tried to update to the latest caddy via getcaddy.com, but I got a bash error.
bash: line 90: ${uname^^}: bad substitution

I’m on macOS 10.12.2

Here’s the full log:
Parhelia:~ sakamies$ curl https://getcaddy.com | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4806 100 4806 0 0 4487 0 0:00:01 0:00:01 --:--:-- 4495 bash: line 90: ${uname^^}: bad substitution Aborting, error 0 in command: [[ ${uname^^} == *DARWIN* ]]

Oops. Will look into it - I pinged @pepa65 on GitHub - he’s pretty good at this stuff. :slight_smile:

This is because bash lower than version 4 (released in 2009) is used. Sorry, I never suspected Caddy would be installed on such systems. I submit a fix immediately.

4 Likes

You’re awesome Peter. Thanks for being so helpful, even though you owe it to nobody!

Thanks Matt, you’re always so encouraging.
I could say I owe it to humanity…!

Looks like even the latest macs ship with a ten year old bash version, ugh.

Just a heads up: the file served at getcaddy.com still has the ^^ which means the file hasn’t been updated yet!

Hah, should run brew install bash :stuck_out_tongue:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.