unicef / magasin

Cloud native open-source end-to-end data / AI / ML platform
https://unicef.github.io/magasin/
Apache License 2.0
5 stars 3 forks source link

Installer declare -A invalid option on MacOS #35

Open merlos opened 8 months ago

merlos commented 8 months ago

On MacOs running ./install-magasin.sh in zsh the following is displayed:

-----------
./install-magasin.sh: line 254: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
merlos commented 7 months ago

This happens when the installer is run without prepending zsh.

In a zsh terminal

% ./install/install-magasin.sh

displays the error. This is because the shebang in the script refers to bash. And bash is run

However if it is run like this:

% zsh ./install-magasin.sh


It does not happen.

Mac OS bash version is relatively old (3.2) compared with the version modern GNU/Linux distribution (5.x) nd does not support declare -A. Which is used to keep track of what commands are missing and need to be installed.