Skip to content

Comments

lib/common: safely expand arrays in strict mode#3

Open
jamesacklin wants to merge 1 commit intoflowercomputers:mainfrom
jamesacklin:main
Open

lib/common: safely expand arrays in strict mode#3
jamesacklin wants to merge 1 commit intoflowercomputers:mainfrom
jamesacklin:main

Conversation

@jamesacklin
Copy link

Hello! I ran into this issue with the /hivemind-search command:

Bash(~/.claude/skills/hivemind-search/search.sh "passkeys")                                                                                               
  ⎿  Error: Exit code 1                                                                                                                                     
     /Users/jamesacklin/.claude/skills/hivemind-search/../lib/hivemind-common.sh: line 146: curl_args[@]: unbound variable

The issue occurs when curl_args is an empty array and bash is running in strict mode with set -u (which treats unset/empty variables as errors).

This proposes conditional expansion, which means if curl_args has elements, we expand them with proper quoting. If it's empty, we expand to nothing (no error).

@givenness
Copy link

+1 ran into this issue as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants