v1.4.427
danielmiessler/Fabricv1.4.427Mar 1, 2026by github-actions[bot]
AI Summary
Improved file fetching compatibility by adding a fallback to the native Git CLI if the in-memory Go-git library fails.
Key Highlights
- Added git CLI fallback using shallow `--depth 1` clone when go-git fails
- Respects `SingleDirectory` and `PathPrefix` options in the CLI path
- Extracted helper functions for better code organization
Full Release Notes
## Changes ### PR [#2038](https://github.com/danielmiessler/Fabric/pull/2038) by [ksylvan](https://github.com/ksylvan): Add Git CLI Fallback to `FetchFilesFromRepo` - Feat: add git CLI fallback to `FetchFilesFromRepo` for improved compatibility - Add git CLI fallback when go-git in-memory clone fails, with detection via `exec.LookPath` - Implement `fetchFilesViaGitCLI` using a shallow `--depth 1` clone into a temp directory with deferred cleanup - Respect `SingleDirectory` and `PathPrefix` options in the CLI path, and surface a combined error when both go-git and CLI fallback fail - Extract `fetchFilesViaGoGit` into a dedicated helper function and add a `copyFile` helper to support CLI-based file extraction