mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-26 09:58:14 +01:00
address the old bash/dir_init() part of issue 55
r845 addresses part of a problem with sbopkg code and bash 3x array handling but not all of it. When creating an array with the += operator, if the array creation code was triggered, the item doing so should have been assigned to index 0 and, instead, an empty string was being assigned to 0 and the item was being assigned to index 1, resulting in a blank line being output before the proper item. Thanks to greinze for pointing this out. Explicitly declaring the variable an array seems to solve this.
This commit is contained in:
parent
5c2ae15a42
commit
50a005bc3e
1 changed files with 2 additions and 1 deletions
|
@ -252,7 +252,8 @@ dir_init() {
|
|||
# Check to make sure certain sbopkg-related directories exist.
|
||||
# If not, create them.
|
||||
|
||||
local DIR_VARS DI_OUTPUT_LINES DIRS2MK DI_OUTPUT REPLY ERROR
|
||||
local -a DIR_VARS DI_OUTPUT_LINES DI_OUTPUT
|
||||
local DIRS2MK REPLY ERROR
|
||||
|
||||
# Keep DIR_VARS and DI_OUTPUT_LINES in sync where REPO_DIR ~ REPO_ROOT.
|
||||
|
||||
|
|
Loading…
Reference in a new issue