set JIRA_OPERATION to "view" when no operation used (ie: jira GOJIRA-123)

This commit is contained in:
Cory Bennett
2015-02-23 12:08:54 -08:00
parent 90a8ee7c33
commit 8040746bcf
+3 -3
View File
@@ -182,9 +182,7 @@ Command Options:
opts["edit"] = "true"
}
} else {
if val, ok := opts["edit"]; ok && val == "true" {
opts["edit"] = "true"
} else {
if val, ok := opts["edit"]; ok && val != "true" {
opts["edit"] = "false"
}
}
@@ -333,6 +331,8 @@ func populateEnv(args map[string]interface{}) {
os.Setenv("JIRA_OPERATION", "assign")
} else if val.(bool) {
os.Setenv("JIRA_OPERATION", key)
} else {
os.Setenv("JIRA_OPERATION", "view")
}
} else {
os.Setenv(fmt.Sprintf("JIRA_%s", key), val.(string))