genlog icon indicating copy to clipboard operation
genlog copied to clipboard

get error from `declare -A`

Open chadlavi-casebook opened this issue 3 years ago • 5 comments

bin/genlog: line 16: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

This is on macOS Big Sur 11.2.1, running in a standard zsh shell (though you'd think that wouldn't matter because of the genlog file's shabang)

chadlavi-casebook avatar Mar 01 '21 14:03 chadlavi-casebook

I changed the shebang to /bin/sh, therefore it should work on all systems, can you trying downloading the script again please ?

Wafelack avatar Mar 03 '21 16:03 Wafelack

Nope, still get the same error.

$ genlog.sh b8390a67 HEAD

# CHANGELOG

## 4.0.4

bin/genlog.sh: line 93: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

edit: though on a different line of the script now, so as a developer I would call that progress! Unless you just happen to have rearranged some stuff.

chadlavi-casebook avatar Mar 03 '21 20:03 chadlavi-casebook

Maybe I forgot to add it in the README, but the program no longer works that way, it works with genlog.sh [tag].

But if you have the previous version, yes the code has been reorganized in order to limit code duplication.

Wafelack avatar Mar 04 '21 05:03 Wafelack

ah I see. Even so, I just used the current version and still got an error:

$ bin/genlog.sh 2022c297
# 2022c297 - 04/03/2021

bin/genlog.sh: line 30: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

chadlavi-casebook avatar Mar 04 '21 15:03 chadlavi-casebook

Try running sh bin/genlog.sh [tag].

Wafelack avatar Mar 04 '21 17:03 Wafelack