1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
diff --git a/cmd/app.go b/cmd/app.go
index ba08026feef942eb038c8c5dec5901cb8828bab7..2c414c1812943c266fae8e361b6cdf87b51b9926 100644
--- a/cmd/app.go
+++ b/cmd/app.go
@@ -31,27 +31,23 @@ app.Usage = "Template automation"
app.Description = "Template automation"
app.Version = Version
app.Flags = []cli.Flag{
- &cli.BoolFlag{
- Name: "debug",
- Aliases: []string{"d"},
- Usage: "Debug mode",
- Destination: &flags.Debug,
- },
&cli.StringFlag{
Name: "registry",
Aliases: []string{"r"},
Usage: "Registry directory of tmpl",
Value: defaultDir,
+ DefaultText: "~/.tmpl",
Destination: &flags.Registry,
+ EnvVars: []string{"TMPL_REGISTRY"},
},
&cli.StringFlag{
Name: "source",
Aliases: []string{"s"},
Usage: "Short-name source to use",
Destination: &flags.Source,
+ EnvVars: []string{"TMPL_SOURCE"},
},
}
- app.Before = before
app.Commands = []*cli.Command{
Download,
@@ -67,10 +63,3 @@ }
return app
}
-
-func before(ctx *cli.Context) error {
- if ctx.Bool("debug") {
- beaver.Console.Level = beaver.DEBUG
- }
- return nil
-}
|