diff options
| author | Paul Buetow <paul@buetow.org> | 2025-02-24 21:09:14 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-02-24 21:09:14 +0200 |
| commit | e735b56a704b7328e7e84def46fd6d248c51e38d (patch) | |
| tree | 34c2bf458d6d0a136439d6891afe490eac64faa3 /internal/config | |
| parent | e957564316024f6412399015d2e8a7861e05ec82 (diff) | |
compose mode does not require any secrets
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/args.go | 2 | ||||
| -rw-r--r-- | internal/config/secrets.go | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/internal/config/args.go b/internal/config/args.go index cdaed8a..e2b9dc1 100644 --- a/internal/config/args.go +++ b/internal/config/args.go @@ -24,7 +24,7 @@ type Args struct { GeminiSummaryFor []string GemtexterEnable bool GeminiCapsules []string - ComposeEntry bool + ComposeMode bool } func (a *Args) ParsePlatforms(platformStrs string) error { diff --git a/internal/config/secrets.go b/internal/config/secrets.go index 338d17a..b4e629f 100644 --- a/internal/config/secrets.go +++ b/internal/config/secrets.go @@ -22,8 +22,13 @@ type Secrets struct { LinkedInPersonID string `json:"LinkedInPersonID,omitempty"` } -func NewSecrets(configPath string) (Secrets, error) { +func NewSecrets(configPath string, composeEntry bool) (Secrets, error) { var sec Secrets + if composeEntry { + // In compose mode, no need to read the secrets. + return sec, nil + } + file, err := os.Open(configPath) if err != nil { return sec, fmt.Errorf("failed to open file: %w", err) |
