Skip to content

Commit

Permalink
Merge pull request #111 from ClogenyTechnologies/ali/modify_bootstrap…
Browse files Browse the repository at this point in the history
…_version_parse_code

Modified parsing code which reads bootstrap_version and handled various cases like parsing the contents having new lines.
  • Loading branch information
Nimisha Sharad committed Feb 4, 2016
2 parents 30a5a60 + 254c54d commit c54db1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ChefExtensionHandler/bin/chef-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ get_chef_version() {
echo "No config file found !!"
else
if cat $config_file_name 2>/dev/null | grep -q "bootstrap_version"; then
chef_version=`sed 's/.*bootstrap_version" *: *"\(.*\)/\1/' $config_file_name 2>/dev/null | awk -F\" '{ print $1 }'`
chef_version=`sed ':a;N;$!ba;s/\n//g' $config_file_name | sed 's/.*bootstrap_version" *: *" *\(.*\)/\1/' 2>/dev/null | awk -F\" '{ print $1 }' | sed 's/[ \t]*$//'`
echo $chef_version
else
echo ""
Expand Down

0 comments on commit c54db1e

Please sign in to comment.