diff options
Diffstat (limited to 'cmd/deploy/deploy.go')
| -rw-r--r-- | cmd/deploy/deploy.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/deploy/deploy.go b/cmd/deploy/deploy.go index 2b3ab4a..ee7ee4a 100644 --- a/cmd/deploy/deploy.go +++ b/cmd/deploy/deploy.go | |||
| @@ -9,7 +9,6 @@ import ( | |||
| 9 | "strconv" | 9 | "strconv" |
| 10 | "strings" | 10 | "strings" |
| 11 | 11 | ||
| 12 | "github.com/bdw/deploy/internal/config" | ||
| 13 | "github.com/bdw/deploy/internal/ssh" | 12 | "github.com/bdw/deploy/internal/ssh" |
| 14 | "github.com/bdw/deploy/internal/state" | 13 | "github.com/bdw/deploy/internal/state" |
| 15 | "github.com/bdw/deploy/internal/templates" | 14 | "github.com/bdw/deploy/internal/templates" |
| @@ -55,14 +54,14 @@ func runDeploy(args []string) { | |||
| 55 | 54 | ||
| 56 | fs.Parse(args) | 55 | fs.Parse(args) |
| 57 | 56 | ||
| 58 | // Get host from flag or config | 57 | // Get host from flag or state default |
| 59 | if *host == "" { | 58 | if *host == "" { |
| 60 | cfg, err := config.Load() | 59 | st, err := state.Load() |
| 61 | if err != nil { | 60 | if err != nil { |
| 62 | fmt.Fprintf(os.Stderr, "Error loading config: %v\n", err) | 61 | fmt.Fprintf(os.Stderr, "Error loading state: %v\n", err) |
| 63 | os.Exit(1) | 62 | os.Exit(1) |
| 64 | } | 63 | } |
| 65 | *host = cfg.Host | 64 | *host = st.GetDefaultHost() |
| 66 | } | 65 | } |
| 67 | 66 | ||
| 68 | if *host == "" || *domain == "" { | 67 | if *host == "" || *domain == "" { |
