"bad array subscript" errors when using "ram" mode #50

Closed
opened 2026-03-13 19:49:20 +01:00 by neil_neilzone · 6 comments

If I build my site using "ram" mode, I get the following errors, which end the build process:

/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript
grep: : No such file or directory
scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory
grep: : No such file or directory
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript
grep: : No such file or directory
scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory
grep: : No such file or directory
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript
grep: : No such file or directory
scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory
grep: : No such file or directory
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript
/home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscrip

If I use the "normal" mode, the site builds correctly.

The line scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory is correct: there is a directory at that path.

Sorry, I am not sure what other useful information I could provide here.

If I build my site using "ram" mode, I get the following errors, which end the build process: ``` /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript grep: : No such file or directory scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory grep: : No such file or directory /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript grep: : No such file or directory scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory grep: : No such file or directory /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_MTIME: bad array subscript grep: : No such file or directory scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory grep: : No such file or directory /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_CONTENT: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 39: BSSG_RAM_FILE_MTIME: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 55: BSSG_RAM_BASENAME_KEY: bad array subscript /home/neil/BSSG/scripts/build/ram_mode.sh: line 70: BSSG_RAM_FILE_CONTENT: bad array subscrip ``` If I use the "normal" mode, the site builds correctly. The line `scripts/build/content.sh: line 59: /home/neil/dl_bssg/.bssg_cache/meta/: Is a directory` is correct: there is a directory at that path. Sorry, I am not sure what other useful information I could provide here.
Owner

Hi, can you please tell me the OS/version/bash version you're using?

Thank you!

Hi, can you please tell me the OS/version/bash version you're using? Thank you!

Not hijacking the thread but adding my own observations…

macOS Tahoe 26.3.1
GNU bash, version 5.3.9(1)-release (aarch64-apple-darwin24.6.0)
(bash installed via homebrew)
bssg: updated to cbc08b0

I too saw these errors recently when starting fresh on a new site. (bad array subscript; grep: no such file or directory)

I switched to ’normal’ build mode and carried on as Neil did. Since then I’ve added several pages and posts.

Today when sitting down to respond I decided to switch back to ‘ram’ mode to duplicate the problem… and guess what? I am no longer getting the errors.

I will try to duplicate the problem again...

Not hijacking the thread but adding my own observations… macOS Tahoe 26.3.1 GNU bash, version 5.3.9(1)-release (aarch64-apple-darwin24.6.0) (bash installed via homebrew) bssg: updated to cbc08b0 I too saw these errors recently when starting fresh on a new site. (bad array subscript; grep: no such file or directory) I switched to ’normal’ build mode and carried on as Neil did. Since then I’ve added several pages and posts. Today when sitting down to respond I decided to switch back to ‘ram’ mode to duplicate the problem… and guess what? I am no longer getting the errors. I will try to duplicate the problem again...

Okay - I’ve got two sites, and the other one does continue to exhibit the errors when “ram” mode is enabled.

Okay - I’ve got two sites, and the other one does continue to exhibit the errors when “ram” mode is enabled.

And you fixed it! “no pages” was the issue. Thanks!

And you fixed it! “no pages” was the issue. Thanks!
Owner

Thank you, fixed

Thank you, fixed
Author

@stefano wrote in #50 (comment):

Thank you, fixed

Thank you!

@stefano wrote in https://brew.bsd.cafe/stefano/BSSG/issues/50#issuecomment-333: > Thank you, fixed Thank you!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stefano/BSSG#50
No description provided.