In bmcs_helper.rb validate_params, if the user is missing an argument that does not contain an underscore (eg. 'shape') then a blank is printed to the screen instead of the argument name.
The issue is with how tr! works in that case:
.gem :003 > "avdomain".tr!('','-')
=> "av-domain" ## works fine because string includes an underscore
[vagrant@localhost knife-bmcs]$ irb
.gem :001 > "shape".tr!('','-')
=> nil
.gem :002 > "shape".tr('','-')
=> "shape"
The fix (as shown above) is to call tr instead of tr!
Signed-off-by: john_l_hopkins john.l.hopkins@oracle.com
In bmcs_helper.rb validate_params, if the user is missing an argument that does not contain an underscore (eg. 'shape') then a blank is printed to the screen instead of the argument name.
The issue is with how
tr!
works in that case:.gem :003 > "avdomain".tr!('','-') => "av-domain" ## works fine because string includes an underscore [vagrant@localhost knife-bmcs]$ irb .gem :001 > "shape".tr!('','-') => nil .gem :002 > "shape".tr('','-') => "shape"
The fix (as shown above) is to call
tr
instead oftr!