Skip to content

[Bugfix]: Correct index population on provision-atlas.sh #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

Jibola
Copy link
Collaborator

@Jibola Jibola commented Apr 25, 2024

Summary

Found in provision-atlas.sh -- The for file in $TARGET_DIR/indexes/*.json loop now removes the quotes as it will expand the glob as one expression "$TARGET_DIR/indexes/*.json" --> "$TARGET_DIR/indexes/x.json, $TARGET_DIR/indexes/y.json" rather than do individual loop iterations.

Incorrect Behavior

for file in "$TARGET_DIR/indexes/*.json"; do
    echo $file "DELIMIT"
done

outputs,

>> echo $TARGET_DIR/indexes/x.json $TARGET_DIR/indexes/y.json DELIMIT

Correct Behavior

for file in $TARGET_DIR/indexes/*.json; do
    echo $file "DELIMIT"
done

outputs,

>> echo $TARGET_DIR/indexes/x.json DELIMIT
>> echo $TARGET_DIR/indexes/y.json DELIMIT

Test for correctness

Check #7 as it implements the correction. Documenting in its own PR for posterity.

Copy link
Collaborator

@caseyclements caseyclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never cease to be astounding by the subtleties. LGTM

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