opscode/chef — pull request #2617 by zuazo (2014-12-11 03:29:44+00:00)
Title: Fix knife cookbook upload messages with --include-dependencies

Fixes two errors when using `knife upload cookbook` with `--include-dependencies`:

#### Upload message on successful uploads with `--include-dependencies`:

Some correct uploads are detected as failed:

```
$ knife cookbook upload --include-dependencies owncloud
Uploading owncloud [0.5.0]
Uploading apache2 [2.0.0]
Uploading apt [2.6.0]
Uploading database [2.3.0]
Uploading mysql [5.5.4]
Uploading nginx [2.7.4]
Uploading openssl [2.0.0]
Uploading php [1.4.6]
Uploading php-fpm [0.6.10]
Uploading postfix [3.6.0]
Uploading postgresql [3.4.2]
Uploading iptables [0.14.0]
Uploading logrotate [1.7.0]
Uploading pacman [1.1.1]
Uploading aws [2.4.0]
Uploading xfs [1.1.0]
Uploading mysql-chef_gem [0.0.2]
Uploading yum-mysql-community [0.1.10]
Uploading bluepill [2.3.1]
Uploading build-essential [2.0.6]
Uploading ohai [2.0.1]
Uploading runit [1.5.11]
Uploading yum-epel [0.5.1]
Uploading chef-sugar [2.2.0]
Uploading xml [1.2.6]
Uploading windows [1.34.2]
Uploading iis [2.1.5]
Uploading yum [3.3.2]
Uploading rsyslog [1.12.2]
Uploading chef_handler [1.1.6]
WARNING: Uploaded 30 cookbooks ok but 20 cookbooks upload failed.
```

#### Failed count message on failures with `--include-dependencies`:

Failures in uploads are counted wrong:

```
$ knife cookbook upload --include-dependencies test_cookbook3
ERROR: Could not find cookbook test_cookbook2 in your cookbook path, skipping it
ERROR: Could not find cookbook test_cookbook3 in your cookbook path, skipping it
ERROR: Could not find cookbook test_cookbook1 in your cookbook path, skipping it
ERROR: Failed to upload 6 cookbooks.
```