summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/gotext/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/gotext/main.go b/cmd/gotext/main.go
index ed0f7ec..5171eb1 100644
--- a/cmd/gotext/main.go
+++ b/cmd/gotext/main.go
@@ -48,11 +48,18 @@ func config() (*pipeline.Config, error) {
if err != nil {
return nil, wrap(err, "invalid srclang")
}
+
+ // Use a default value since rewrite and extract don't have an out flag.
+ genFile := ""
+ if out != nil {
+ genFile = *out
+ }
+
return &pipeline.Config{
SourceLanguage: tag,
Supported: getLangs(),
TranslationsPattern: `messages\.(.*)\.json$`,
- GenFile: *out,
+ GenFile: genFile,
Dir: *dir,
}, nil
}