diff --git a/ynh-dev b/ynh-dev index 1dadcd4..57a2f69 100755 --- a/ynh-dev +++ b/ynh-dev @@ -175,12 +175,12 @@ elif [ "$1" = "run" ]; then } # Adapt vagrantfile - sed -i "/ ### END AUTOMATIC YNH-DEV ###/ i \\ - config.vm.define \"${VMNAME}\" do |${VMNAME}| \ + perl -i -pe "s| (### END AUTOMATIC YNH-DEV ###)|\ + config.vm.define \"${VMNAME}\" do \|${VMNAME}\| \ \n ${VMNAME}.vm.box = \"${BOX_NAME}\" \ \n ${VMNAME}.vm.network :private_network, ip: \"${IP}\" \ \n end \ -\n" ./Vagrantfile +\n \1|" ./Vagrantfile } # Run VM