summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2017-12-20 09:06:55 +0000
committerGitHub <noreply@github.com>2017-12-20 09:06:55 +0000
commitcb5df13de7466ec41572d15f55f557f06c8f278a (patch)
tree11f7f3832b2d4389271455efe91e6f46815f3423
parentd454fdd7304101f0bce60070343ca51aa513d91b (diff)
parenta4b0fb6d4a4c21cfb8ca00af30d8cfb3beaa2bbe (diff)
downloadchef-cb5df13de7466ec41572d15f55f557f06c8f278a.tar.gz
Merge pull request #6552 from anoadragon453/master
Add an 's' for quantity of 0 cookbooks.
-rw-r--r--lib/chef/knife/cookbook_upload.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb
index 6938ac280d..92084e7906 100644
--- a/lib/chef/knife/cookbook_upload.rb
+++ b/lib/chef/knife/cookbook_upload.rb
@@ -146,12 +146,12 @@ class Chef
end
if upload_failures == 0
- ui.info "Uploaded #{upload_ok} cookbook#{upload_ok > 1 ? "s" : ""}."
+ ui.info "Uploaded #{upload_ok} cookbook#{upload_ok == 1 ? "" : "s"}."
elsif upload_failures > 0 && upload_ok > 0
- ui.warn "Uploaded #{upload_ok} cookbook#{upload_ok > 1 ? "s" : ""} ok but #{upload_failures} " +
- "cookbook#{upload_failures > 1 ? "s" : ""} upload failed."
+ ui.warn "Uploaded #{upload_ok} cookbook#{upload_ok == 1 ? "" : "s"} ok but #{upload_failures} " +
+ "cookbook#{upload_failures == 1 ? "" : "s"} upload failed."
elsif upload_failures > 0 && upload_ok == 0
- ui.error "Failed to upload #{upload_failures} cookbook#{upload_failures > 1 ? "s" : ""}."
+ ui.error "Failed to upload #{upload_failures} cookbook#{upload_failures == 1 ? "" : "s"}."
exit 1
end
end