sborsay / AWS-Serverless-IoT-Book

All Code, Corrections, and Relevant Material for AWS Serverless IoT Book. Find it on Amazon here: https://www.amazon.com/AWS-Serverless-IoT-Inexpensive-Projects-ebook/dp/B0B9P325F7
7 stars 1 forks source link

VS Code got called when Chapter 1:: Bash_Script.sh is exec in CLI #1

Closed techtoys closed 1 year ago

techtoys commented 1 year ago

Hi

I am following Chapter 1 to run the Bash_Script.sh but there is no MQTT message pushing to AWS. Instead, VS Code got call up on my computer with CLI messages as follows:

C:\Users\User>Bash_Script.sh

C:\Users\User>
[main 2023-10-20T16:32:41.492Z] update#setState idle
[main 2023-10-20T16:32:42.953Z] WSL is not installed, so could not detect WSL profiles
[main 2023-10-20T16:33:11.495Z] update#setState checking for updates
[main 2023-10-20T16:33:11.597Z] update#setState idle

What may go wrong with my setup?

John

sborsay commented 1 year ago

I'm running the bash script from the command prompt with Git for Windows. Git for Windows provides a BASH emulation used to run Git from the command line. The problem is likely that Visual code does not have a standard Bash shell interpreter. I advise you to use the bash shell tool from MInGW-64, cygwin-64, or Git. The easiest Bash interpreter for windows can be found here:

https://gitforwindows.org/

SDB

On Fri, Oct 20, 2023 at 9:47 AM John Leung @.***> wrote:

Hi

I am following Chapter 1 to run the Bash_Script.sh but there is no MQTT message pushing to AWS. Instead, VS Code got call up on my computer with CLI messages as follows:

C:\Users\User>Bash_Script.sh

C:\Users\User> [main 2023-10-20T16:32:41.492Z] update#setState idle [main 2023-10-20T16:32:42.953Z] WSL is not installed, so could not detect WSL profiles [main 2023-10-20T16:33:11.495Z] update#setState checking for updates [main 2023-10-20T16:33:11.597Z] update#setState idle

What may go wrong with my setup?

John

— Reply to this email directly, view it on GitHub https://github.com/sborsay/AWS-Serverless-IoT-Book/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4KXRBKIL32MGUGRNHGKYLYAKTKZAVCNFSM6AAAAAA6JJWAYWVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TINRYHA2DENI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sborsay commented 1 year ago

Also I am assume you already installed the AWS CLI?

techtoys commented 1 year ago

Hi Stephen

It works once Git got installed on my Windows host: Just need to run $ bash iot_Tester.sh.

Yes, AWS CLI installed.

Thanks.

John

sborsay commented 1 year ago

Cool, this may allow it to work from VS Code if you want.  Not sureInstalling the AWS Toolkit for Visual Studio Code - AWS Toolkit for VS Codeaws.amazon.comSent from my iPhoneOn Oct 20, 2023, at 8:32 PM, John Leung @.***> wrote: Hi Stephen It works once Git got installed on my Windows host: Just need to run $ bash iot_Tester.sh. Thanks. John

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>