first pb deploy fix

This commit is contained in:
2026-01-13 17:32:13 +00:00
parent 269e339b4d
commit bf8e26a647

View File

@@ -1078,15 +1078,18 @@ func runDeploy() error {
if err != nil { if err != nil {
return err return err
} }
defer closeSSHControlMaster(ctx.serverIP) defer func() {
closeSSHControlMaster(ctx.serverIP)
}()
start := time.Now() start := time.Now()
binaryPath := filepath.Join(ctx.serviceDir, "pocketbase") binaryPath := filepath.Join(ctx.serviceDir, "pocketbase")
exists, err := remoteBinaryExists(ctx.serverIP, binaryPath) exists, err := remoteBinaryExists(ctx.serverIP, binaryPath)
if err != nil { if err != nil {
return err fmt.Fprintf(os.Stderr, "warning: Unable to contact remote server %s: %v\n", ctx.serverIP, err)
} }
if !exists {
if err != nil || !exists {
fmt.Println("PocketBase binary missing on remote; running setup") fmt.Println("PocketBase binary missing on remote; running setup")
ctx, err = ensureServerConfigConfirmed(ctx) ctx, err = ensureServerConfigConfirmed(ctx)
if err != nil { if err != nil {