Pizzaface/Alexa-Chromecast-Skill-2.0

Lambda Function Issue

maans2001 opened this issue · 5 comments

I'm trying to install this skill for 3 days and I'm just getting errors and fixing them but now i'm stuck on this

When I'm running aws-setup.sh

it says

Creating AmazonAlexaSkill role.
Creating AlexaChromecastSkillCommands topic.
Creating AlexaChromecastSkill lambda function.
/usr/bin/env: bash -e: No such file or directory

I don't know what is the problem here

I am getting similar when trying the same with

root@ha:/home/pi/Alexa-Chromecast-Skill-2.0# ./start.sh
./start.sh: line 7: .env: No such file or directory

With or without sudo, bash start.sh , sh start.sh etc

I had to use the following workaround, but note that I am not running on a RPi, but rather a Pogoplug_E02 running Arch Linux. I figured it was because my environment was different.

Updated the first line of all of the scripts to use the following:

#!/usr/bin/bash -e

rather than the default

#!/usr/bin/env bash -e

Confirmed, even on raspi this error occurs, switching to
#!/bin/bash -e
instead works on latest Raspbian (Stretch) as well

I faced the issue and had to replace "#!/usr/bin/env bash -e" with "#!/bin/bash -e" in all .sh files while installing on my Raspberry pi 3. There should be a better fix of this issue which can switch bash depending upon the OS.

Changed in the latest release to use #!/bin/bash.

Recommend closing.