Skip to content
Permalink
Browse files

add IsCI() util

  • Loading branch information...
tj committed Feb 2, 2018
1 parent 8a95388 commit 4dec85331fac0a526a48bac6083704e11642646a
Showing with 7 additions and 1 deletion.
  1. +2 −1 internal/cli/root/root.go
  2. +5 −0 internal/util/util.go
@@ -10,6 +10,7 @@ import (
"github.com/tj/kingpin"

"github.com/apex/up"
"github.com/apex/up/internal/util"
"github.com/apex/up/platform/event"
"github.com/apex/up/platform/lambda"
"github.com/apex/up/reporter"
@@ -61,7 +62,7 @@ func init() {
switch {
case *verbose:
go reporter.Discard(events)
case *format == "plain" || os.Getenv("CI") == "true":
case *format == "plain" || util.IsCI():
go reporter.Plain(events)
default:
go reporter.Text(events)
@@ -436,3 +436,8 @@ func UniqueStrings(s []string) (v []string) {
}
return
}

// IsCI returns true if the env looks like it's a CI platform.
func IsCI() bool {
return os.Getenv("CI") == "true"
}

0 comments on commit 4dec853

Please sign in to comment.
You can’t perform that action at this time.