0

我正在尝试将应用程序版本部署到弹性 beanstalk,但我的配置文件格式不正确。

有很多转义引号,所以我认为这是不正确的,但我不知道如何解决它。

这是导致问题的线路;

    command: "sudo bash -c 'echo \"<img src=\'http://www.foo.com/img/custom_500.png\' alt=\'500\' style=\'left:50%;top:50%;position:fixed;margin-top:-235px;margin-left:-200px\'/>\"' > custom_50x.html"
4

1 回答 1

1

尝试不使用开头和结尾的引号,如下所示:

command: sudo bash -c 'echo \"<img src=\'http://www.foo.com/img/custom_500.png\' alt=\'500\' style=\'left:50%;top:50%;position:fixed;margin-top:-235px;margin-left:-200px\'/>\"' > custom_50x.html

快速确定是否有问题的有用工具是使用此在线YAML 解析器

于 2018-11-20T13:08:42.877 回答