Permalink
Browse files

grep -V prints version info; -v is what we need

  • Loading branch information...
1 parent de6c638 commit ccc6f975f835059ce5f3c8ca5fec1ce3700bf6c0 @drnic drnic committed Feb 26, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/bosh/cli/commands/cf.rb
  2. +2 −2 spec/unit/cf_command_spec.rb
View
2 lib/bosh/cli/commands/cf.rb
@@ -436,7 +436,7 @@ def bosh_stemcell_name(stemcell_type)
tags << "stable" if stemcell_type == "stable" unless openstack?
bosh_stemcells_cmd = "bosh public stemcells --tags #{tags.join(',')}"
say "Locating bosh stemcell, running '#{bosh_stemcells_cmd}'..."
- `#{bosh_stemcells_cmd} | grep ' bosh-stemcell-' | grep -V pre | awk '{ print $2 }' | sort -r | head -n 1`.strip
+ `#{bosh_stemcells_cmd} | grep ' bosh-stemcell-' | grep -v pre | awk '{ print $2 }' | sort -r | head -n 1`.strip
end
def download_stemcell(stemcell_name)
View
4 spec/unit/cf_command_spec.rb
@@ -43,11 +43,11 @@
@cmd.stub!(:bosh_target_uuid).and_return("DIRECTOR_UUID")
@cmd.stub!(:bosh_cpi).and_return("aws")
@cmd.should_receive(:`).
- with("bosh public stemcells --tags aws | grep ' bosh-stemcell-' | grep -V pre | awk '{ print $2 }' | sort -r | head -n 1").
+ with("bosh public stemcells --tags aws | grep ' bosh-stemcell-' | grep -v pre | awk '{ print $2 }' | sort -r | head -n 1").
and_return("bosh-stemcell-aws-0.6.7.tgz")
# FIXME default to stable stemcells when 0.8.1 is marked stable
# @cmd.should_receive(:`).
- # with("bosh public stemcells --tags aws,stable | grep ' bosh-stemcell-' | grep -V pre | awk '{ print $2 }' | sort -r | head -n 1").
+ # with("bosh public stemcells --tags aws,stable | grep ' bosh-stemcell-' | grep -v pre | awk '{ print $2 }' | sort -r | head -n 1").
# and_return("bosh-stemcell-aws-0.6.7.tgz")
@cmd.should_receive(:sh).
with("bosh -n --color download public stemcell bosh-stemcell-aws-0.6.7.tgz")

0 comments on commit ccc6f97

Please sign in to comment.