Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cmd/agent_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cmd
import (
"fmt"
"net/http"
"os"
"strings"
"time"

Expand Down Expand Up @@ -36,6 +35,10 @@ VM launches.`,
}

func runAgentLogsE(cmd *cobra.Command, args []string) error {
if err := checkGitHubOnly("agent-logs"); err != nil {
return err
}

if len(args) < 1 {
return fmt.Errorf("specify the host as an argument")
}
Expand Down Expand Up @@ -73,7 +76,12 @@ func runAgentLogsE(cmd *cobra.Command, args []string) error {
return fmt.Errorf("pat is required")
}

c := pkg.NewClient(http.DefaultClient, os.Getenv("ACTUATED_URL"))
controllerURL, err := getControllerURL()
if err != nil {
return err
}

c := pkg.NewClient(http.DefaultClient, controllerURL)

res, status, err := c.GetAgentLogs(pat, owner, host, age, staff)

Expand Down
Loading