browser flag
This commit is contained in:
parent
f8ad2a8f32
commit
f74e260624
2 changed files with 10 additions and 0 deletions
|
|
@ -80,6 +80,9 @@ Renders the diagram to look like it was sketched by hand
|
|||
.It Fl -pad Ar 100
|
||||
Pixels padded around the rendered diagram
|
||||
.Ns .
|
||||
.It Fl -browser Ar true
|
||||
Open the browser and go to the address that watch streams updates to
|
||||
.Ns .
|
||||
.It Fl l , -layout Ar dagre
|
||||
Set the diagram layout engine to the passed string. For a list of available options, run
|
||||
.Ar layout
|
||||
|
|
|
|||
|
|
@ -83,6 +83,10 @@ func Run(ctx context.Context, ms *xmain.State) (err error) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
browserFlag, err := ms.Opts.Bool("BROWSER", "browser", "", true, "open the browser and go to the address that watch streams updates to")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ps, err := d2plugin.ListPlugins(ctx)
|
||||
if err != nil {
|
||||
|
|
@ -126,6 +130,9 @@ func Run(ctx context.Context, ms *xmain.State) (err error) {
|
|||
if *debugFlag {
|
||||
ms.Env.Setenv("DEBUG", "1")
|
||||
}
|
||||
if !*browserFlag {
|
||||
ms.Env.Setenv("BROWSER", "0")
|
||||
}
|
||||
|
||||
var inputPath string
|
||||
var outputPath string
|
||||
|
|
|
|||
Loading…
Reference in a new issue