chain bisect: json-marshar the correct thing
This commit is contained in:
parent
479a456279
commit
4cd861eb87
@ -717,7 +717,7 @@ var chainBisectCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
b, err := json.MarshalIndent(nd, "", "\t")
|
b, err := json.MarshalIndent(nd.Obj, "", "\t")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -734,13 +734,13 @@ var chainBisectCmd = &cli.Command{
|
|||||||
switch cmd.Run().(type) {
|
switch cmd.Run().(type) {
|
||||||
case nil:
|
case nil:
|
||||||
// it's lower
|
// it's lower
|
||||||
if strings.TrimSpace(out.String()) == "true" {
|
if strings.TrimSpace(out.String()) != "false" {
|
||||||
end = mid
|
end = mid
|
||||||
highest = midTs
|
highest = midTs
|
||||||
fmt.Println("true")
|
fmt.Println("true")
|
||||||
} else {
|
} else {
|
||||||
start = mid
|
start = mid
|
||||||
fmt.Printf("false ('%s' not 'true')\n", strings.TrimSpace(out.String()))
|
fmt.Printf("false (cli)\n")
|
||||||
}
|
}
|
||||||
case *exec.ExitError:
|
case *exec.ExitError:
|
||||||
if len(serr.String()) > 0 {
|
if len(serr.String()) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user