Skip to content

fix SIGSEGV when store config was found but isn't readable - #34

Merged
SKevo18 merged 1 commit into
mainfrom
ks/nil-fix
Jun 13, 2026
Merged

fix SIGSEGV when store config was found but isn't readable#34
SKevo18 merged 1 commit into
mainfrom
ks/nil-fix

Conversation

@SKevo18

@SKevo18 SKevo18 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@@ -0,0 +1,14 @@
<?php

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would break tests otherwise:

could not parse fixture//magento2/configs/empty.php, missing user or db name
open /do/not/exist: no such file or directory
--- FAIL: TestDiscoverStores (0.05s)
    store_test.go:24: 
                Error Trace:    store_test.go:24
                Error:          "[%!s(*gocommerce.Store=&{fixture/discovery/applications/123456789/public_html 0x1016eec60 0x1d8fb903abe8})]" should have 2 item(s), but has 1
                Test:           TestDiscoverStores
panic: runtime error: index out of range [1] with length 1 [recovered, repanicked]

the configs should never be empty anyways(?), so I added a minimal placeholder

@SKevo18
SKevo18 requested a review from gwillem June 13, 2026 09:53
@SKevo18
SKevo18 merged commit c0c9d06 into main Jun 13, 2026
3 checks passed
@SKevo18
SKevo18 deleted the ks/nil-fix branch June 13, 2026 17:28
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