moving print debug test to top of file
This commit is contained in:
parent
3bf814670c
commit
c51804fc5c
6
main.go
6
main.go
|
@ -16,6 +16,8 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
|
fmt.Println(os.Getenv("DEBUG"))
|
||||||
|
|
||||||
// plugin settings
|
// plugin settings
|
||||||
var repo = drone.Repo{}
|
var repo = drone.Repo{}
|
||||||
var build = drone.Build{}
|
var build = drone.Build{}
|
||||||
|
@ -98,7 +100,6 @@ func main() {
|
||||||
|
|
||||||
// set basic auth if a user or user and pass is provided
|
// set basic auth if a user or user and pass is provided
|
||||||
if len(vargs.Auth.Username) > 0 {
|
if len(vargs.Auth.Username) > 0 {
|
||||||
fmt.Println("setting basic auth")
|
|
||||||
if len(vargs.Auth.Password) > 0 {
|
if len(vargs.Auth.Password) > 0 {
|
||||||
req.SetBasicAuth(vargs.Auth.Username, vargs.Auth.Password)
|
req.SetBasicAuth(vargs.Auth.Username, vargs.Auth.Password)
|
||||||
} else {
|
} else {
|
||||||
|
@ -113,9 +114,6 @@ func main() {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
fmt.Println(vargs.Debug)
|
|
||||||
fmt.Println(os.Getenv("DEBUG"))
|
|
||||||
|
|
||||||
if vargs.Debug || os.Getenv("DEBUG") == "true" {
|
if vargs.Debug || os.Getenv("DEBUG") == "true" {
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user