TsutomuNakamura / dotfiles

3 stars 1 forks source link

Error message when install_packages_with_apt() was failed is incorrect. #169

Closed TsutomuNakamura closed 4 years ago

TsutomuNakamura commented 4 years ago

Error message when install_packages_with_apt() was failed is incorrect like below.

ERROR: line 957: install_packages_with_apt(): Some error occured when installing zsh  

This message should follow other package names but disappeard.

TsutomuNakamura commented 4 years ago

This issue may related to be the argument of the function "logger_err" is like...

# in logger_err()
local message="$1"

This syntax will cause unexpected behavior if the argument contains an array.

declare -a some_array=("one" "two" "three")
logger_err "foo ${some_array[@]} bar"

Then the function will receive argument like below.

foo one

To solve this problem, this program should receive arguments like below.

# in logger_err()
local message="$@"
TsutomuNakamura commented 4 years ago

Closed by #170.