mayadata-io / deployment-automation-playground

Repo for comparing deployment automation tools like argo and terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo-playground up.sh error: sed: 1: "inventory/maya-demo/inv ...": command i expects \ followed by text

watcher00090 opened this issue · comments

On Mac OS-X 11.2.1, up.sh runs fine until it stops with the following error:

+ sed -i '/^bastion/d' inventory/maya-demo/inventory.ini
sed: 1: "inventory/maya-demo/inv ...": command i expects \ followed by text

This issue arises because the 'sed' command on OS-X is of a slightly different flavor than the GNU sed. We can solve this issue by explicitly creating backup files with sed, by using a command like this:

sed -i'.original' '/^bastion/d' inventory/maya-demo/inventory.ini

, or by using an alternative to sed, for instance perl. See this StackOverflow post for more information.