Exit with non-zero code when trying to do interactive onboarding and --batch is set
This commit is contained in:
parent
6c49bd694f
commit
d55cccc236
4 changed files with 14 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package onboard
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/alecthomas/kingpin"
|
||||
"github.com/apex/log"
|
||||
"github.com/ooni/probe-cli/internal/cli/root"
|
||||
|
|
@ -29,6 +31,9 @@ func init() {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
if ctx.IsBatch == true {
|
||||
return errors.New("cannot do onboarding in batch mode")
|
||||
}
|
||||
|
||||
return onboard.Onboarding(ctx.Config)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue