diff --git a/cmd/afc/afcInit.go b/cmd/afc/afcInit.go index b7d3cf6..c66086a 100644 --- a/cmd/afc/afcInit.go +++ b/cmd/afc/afcInit.go @@ -18,7 +18,6 @@ package afc import ( - "fmt" giDevice "github.com/SonicCloudOrg/sonic-gidevice" "github.com/SonicCloudOrg/sonic-ios-bridge/src/util" "github.com/spf13/cobra" @@ -57,7 +56,7 @@ func getAFCServer() (afcServer giDevice.Afc) { var houseArrestSrv giDevice.HouseArrest houseArrestSrv, err = device.HouseArrestService() if err != nil { - fmt.Println(err) + util.NewErrorPrint(util.ErrSendCommand, "house arrest", err) os.Exit(0) } afcServer, err = houseArrestSrv.Documents(bundleId) @@ -65,7 +64,7 @@ func getAFCServer() (afcServer giDevice.Afc) { afcServer, err = device.AfcService() } if err != nil { - fmt.Println(err) + util.NewErrorPrint(util.ErrSendCommand, "afc", err) os.Exit(0) } return afcServer diff --git a/cmd/run/wda.go b/cmd/run/wda.go index cb0401e..8539a16 100644 --- a/cmd/run/wda.go +++ b/cmd/run/wda.go @@ -70,7 +70,6 @@ var wdaCmd = &cobra.Command{ testEnv := make(map[string]interface{}) testEnv["USE_PORT"] = serverRemotePort testEnv["MJPEG_SERVER_PORT"] = mjpegRemotePort - util.CheckMount(device) output, stopTest, err2 := device.XCTest(wdaBundleID, giDevice.WithXCTestEnv(testEnv)) if err2 != nil { fmt.Printf("WebDriverAgent server start failed: %s", err2) diff --git a/cmd/run/xctest.go b/cmd/run/xctest.go index 5d187a6..2e84a20 100644 --- a/cmd/run/xctest.go +++ b/cmd/run/xctest.go @@ -70,7 +70,6 @@ var xctestCmd = &cobra.Command{ log.Println("Read env:", testEnv) } - util.CheckMount(device) output, stopTest, err2 := device.XCTest(xcTestBundleID, giDevice.WithXCTestEnv(testEnv)) if err2 != nil { fmt.Printf("xctest start failed: %s", err2)