feat: added downloading templated archives

This commit is contained in:
David Allen 2025-08-28 12:25:45 -06:00
parent 1ebea8cb73
commit 98f9acad5d
Signed by: towk
GPG key ID: 0430CDBE22619155
5 changed files with 48 additions and 23 deletions

View file

@ -92,7 +92,10 @@ var downloadCmd = cobra.Command{
}
if res.StatusCode != http.StatusOK {
log.Error().
Int("status", res.StatusCode).
Any("status", map[string]any{
"code": res.StatusCode,
"message": res.Status,
}).
Str("host", host).
Str("path", path).
Str("output", outputPath).
@ -125,6 +128,7 @@ func init() {
downloadCmd.Flags().StringP("output", "o", "", "Set the output path to write files")
downloadCmd.Flags().StringSlice("profiles", []string{}, "Set the profile to use to populate data store")
downloadCmd.Flags().StringSlice("plugins", []string{}, "Set the plugins to run before downloading files")
downloadCmd.Flags().Bool("extract", false, "Set whether to extract archive locally after downloading")
downloadCmd.AddCommand(downloadProfileCmd, downloadPluginCmd)