disney / meteor-base

Base Docker image for use by Meteor apps
Other
262 stars 119 forks source link

fix: update.sh adds multiple lines to supports.sh #155 #156

Closed bladerunner2020 closed 8 months ago

bladerunner2020 commented 8 months ago

The issue in update.sh was due $ is treated as address and means end of file in this line:

do_sed $"s|'${node_version}'|'${node_version}'\\n   elif [[ \"\$1\" == ${new_meteor_version} ]]; then node_version='${new_node_version}'|" ./support.sh

As sed works line by line there is no simple way to tell sed use the latest occurrence in the file (well at least I didn't find that). So my approach is a bit complicated but works well:

-ap