Skip to content

Commit 4292b66

Browse files
committed
Move installation confirmation to setup.sh, explain all steps upfront
1 parent f688433 commit 4292b66

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

internal/maestro/maestro.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package maestro
22

33
import (
44
"archive/zip"
5-
"bufio"
65
"fmt"
76
"io"
87
"net/http"
@@ -69,16 +68,6 @@ func RunSetup() error {
6968
}
7069

7170
fmt.Println()
72-
fmt.Println("This will:")
73-
fmt.Printf(" 1. Download and extract JARs to %s\n", libPath)
74-
fmt.Printf(" 2. Download and extract iOS runner to %s\n", runnerPath)
75-
fmt.Println()
76-
77-
if !confirm("Proceed?") {
78-
return fmt.Errorf("cancelled")
79-
}
80-
fmt.Println()
81-
8271
fmt.Println("📥 Downloading JARs...")
8372
if err := downloadAndExtract(releaseURL+"/"+jarsZip, libPath); err != nil {
8473
return fmt.Errorf("failed to download JARs: %w", err)
@@ -284,10 +273,3 @@ func extractFile(f *zip.File, target string) error {
284273
return err
285274
}
286275

287-
func confirm(prompt string) bool {
288-
fmt.Printf("%s (y/n): ", prompt)
289-
reader := bufio.NewReader(os.Stdin)
290-
resp, _ := reader.ReadString('\n')
291-
resp = strings.ToLower(strings.TrimSpace(resp))
292-
return resp == "y" || resp == "yes"
293-
}

setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ echo "║ ║"
2424
echo "║ Built by DeviceLab — https://devicelab.dev ║"
2525
echo "╚════════════════════════════════════════════════════════════════╝"
2626
echo ""
27+
echo "This will:"
28+
echo " 1. Download maestro-ios-device binary"
29+
echo " 2. Download and extract patched JARs to ~/.maestro/lib"
30+
echo " 3. Download and extract iOS runner to ~/.maestro/maestro-ios-xctest-runner"
31+
echo ""
2732

2833
printf "Continue with installation? [y/N] "
2934
read -r REPLY </dev/tty

0 commit comments

Comments
 (0)