From aef52f7757f47429db00166a3c450b232d4493b9 Mon Sep 17 00:00:00 2001 From: MarcelStranak Date: Fri, 10 Nov 2023 07:39:14 +0100 Subject: [PATCH 1/3] Add Git Bash information Added details how to use Git Bash with LocalStack to prevent unnecessary errors. --- content/en/getting-started/faq.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/en/getting-started/faq.md b/content/en/getting-started/faq.md index 5d83843179..4a3dcc3975 100644 --- a/content/en/getting-started/faq.md +++ b/content/en/getting-started/faq.md @@ -46,6 +46,25 @@ The diagnose endpoint is only available if you run LocalStack with `DEBUG=1`. You can access LocalStack from an alternative computer, by exposing port `4566` to the public network interface (`0.0.0.0` instead of `127.0.0.1`) in your `docker-compose.yml` configuration. However, we do not recommend using this setup - for security reasons, as it exposes your local computer to potential attacks from the outside world. +### How to resolve Git Bash issues with LocalStack? + +If you're using Git Bash with LocalStack, you might encounter some issues. +This is due to the automatic conversion of POSIX paths to Windows paths when command-line options start with a slash. +For instance, `"/usr/bin/bash.exe"` would be converted to `"C:\Program Files\Git\usr\bin\bash.exe"`. +This conversion can cause problems when it's not needed, such as with `"--name /test/parameter/new"`. +To prevent this, you can temporarily set the `MSYS_NO_PATHCONV` environment variable. +Another workaround is to double the first slash in your command to prevent the POSIX-to-Windows path conversion. + +```bash +#set the environment variable +MSYS_NO_PATHCONV=1 aws ssm put-parameter --name "/test/parameter/new" --type String --value "test" +aws ssm get-parameter --name "/test/parameter/new" + +# double the first slash +aws ssm put-parameter --name "//test/parameter/new" --type String --value "test" +aws ssm get-parameter --name "/test/parameter/new" +``` + ### How to fix LocalStack CLI (Python) UTF-8 encoding issue under Windows? If you are using LocalStack CLI under Windows, you might run into encoding issues. To fix this, set the following environment variables: From 69737eb1fd1e5efc1f0bc9316f04d699b07b6c1e Mon Sep 17 00:00:00 2001 From: MarcelStranak Date: Fri, 10 Nov 2023 07:46:25 +0100 Subject: [PATCH 2/3] add link to git bash known issues --- content/en/getting-started/faq.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/getting-started/faq.md b/content/en/getting-started/faq.md index 4a3dcc3975..01f163a38c 100644 --- a/content/en/getting-started/faq.md +++ b/content/en/getting-started/faq.md @@ -65,6 +65,8 @@ aws ssm put-parameter --name "//test/parameter/new" --type String --value "test" aws ssm get-parameter --name "/test/parameter/new" ``` +For additional known issues related to Git Bash, you can refer to the following link: [Git Bash Known Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues) + ### How to fix LocalStack CLI (Python) UTF-8 encoding issue under Windows? If you are using LocalStack CLI under Windows, you might run into encoding issues. To fix this, set the following environment variables: From 2dffa72f461fbfe31a19698c97281492c9106066 Mon Sep 17 00:00:00 2001 From: MarcelStranak Date: Fri, 10 Nov 2023 11:16:10 +0100 Subject: [PATCH 3/3] Update content/en/getting-started/faq.md Co-authored-by: Dominik Schubert --- content/en/getting-started/faq.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/content/en/getting-started/faq.md b/content/en/getting-started/faq.md index 01f163a38c..618ab7b5d5 100644 --- a/content/en/getting-started/faq.md +++ b/content/en/getting-started/faq.md @@ -55,15 +55,20 @@ This conversion can cause problems when it's not needed, such as with `"--name / To prevent this, you can temporarily set the `MSYS_NO_PATHCONV` environment variable. Another workaround is to double the first slash in your command to prevent the POSIX-to-Windows path conversion. -```bash -#set the environment variable -MSYS_NO_PATHCONV=1 aws ssm put-parameter --name "/test/parameter/new" --type String --value "test" -aws ssm get-parameter --name "/test/parameter/new" +This will lead to issues with Git Bash +{{< command >}} +$ aws ssm get-parameter --name "/test/parameter/new" +{{< / command >}} -# double the first slash -aws ssm put-parameter --name "//test/parameter/new" --type String --value "test" -aws ssm get-parameter --name "/test/parameter/new" -``` +Option 1: Set the environment variable +{{< command >}} +$ MSYS_NO_PATHCONV=1 aws ssm put-parameter --name "/test/parameter/new" --type String --value "test" +{{< / command >}} + +Option 2: Double the first slash +{{< command >}} +$ aws ssm put-parameter --name "//test/parameter/new" --type String --value "test" +{{< / command >}} For additional known issues related to Git Bash, you can refer to the following link: [Git Bash Known Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues)