Expand pipeline panes and select the verified Docker client endpoint
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/client"
|
||||
"git.a-wan.net/alan/pipelines/internal/tui"
|
||||
)
|
||||
|
||||
@@ -22,6 +23,26 @@ func main() {
|
||||
allow := flag.Bool("allow-tools", false, "Compatibility flag; tools follow the pipeline stages")
|
||||
paths := flag.String("write-paths", "", "Optional narrower edit scope; default is the run directory")
|
||||
flag.Parse()
|
||||
explicit := false
|
||||
flag.Visit(func(value *flag.Flag) {
|
||||
if value.Name == "url" {
|
||||
explicit = true
|
||||
}
|
||||
})
|
||||
if !explicit {
|
||||
if value := os.Getenv("PIPELINES_URL"); value != "" {
|
||||
*url = value
|
||||
} else {
|
||||
configured, err := client.ConfiguredURL()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
if configured != "" {
|
||||
*url = configured
|
||||
}
|
||||
}
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
model := tui.New(ctx, *url)
|
||||
|
||||
Reference in New Issue
Block a user