mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
* test: Add test documenting bug #4762 - version file failure returns digest This test documents issue #4762 where InstallDB and InstallFdw return both a digest AND an error when version file update fails after successful installation. Current buggy behavior: - Installation succeeds (files copied) - Version file update fails - Function returns (digest, error) - ambiguous state Expected behavior: - Should return ("", error) for clear failure semantics - Either all succeeds or all fails The test currently FAILS to demonstrate the bug exists. Related to #4762 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> * fix: Return empty digest on version file failure (#4762) Fixes issue #4762 where InstallDB and InstallFdw returned ambiguous state by returning both a digest AND an error when version file update failed after successful installation. Changes: - InstallDB (db.go:38): Return ("", error) instead of (digest, error) - InstallFdw (fdw.go:41): Return ("", error) instead of (digest, error) This ensures clear success/failure semantics: - No digest + error = installation failed (clear failure) - Digest + no error = installation succeeded (clear success) - No ambiguous (digest, error) state Since version file tracking is critical for managing installations, its failure is now treated as installation failure. This prevents version mismatch issues and unnecessary reinstalls. Closes #4762 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>