aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Add "sam" script for bash on windows

Open juniorgasparotto opened this issue 3 years ago • 4 comments

Describe your idea/feature/enhancement

When using gitbash, on windows we are unable to run the command "sam"

Proposal

In the "C:\Program Files\Amazon\AWSSAMCLI\bin" folder, I suggest adding a new file called "sam" (no extension) with the following content:

DIR="$(dirname "${BASH_SOURCE[0]}")"  # get the directory name
"$DIR/../runtime/python.exe" -m samcli "$@"

juniorgasparotto avatar Jan 15 '22 17:01 juniorgasparotto

Thanks for the feature request! We have a roadmap here, but we also try to take in popular feature requests based on 👍🏽 from the community. We will be adding this to our intake for prioritization.

hawflau avatar Jan 19 '22 16:01 hawflau

calling ${DIR}/sam.cmd $@ would work too, if the team doesn't want to worry about duplicating any of the Python call

hauntingEcho avatar May 16 '22 16:05 hauntingEcho

This can currently be worked around by adding alias sam='sam.cmd' to your .bashrc file. Relevant StackOverflow

hauntingEcho avatar May 16 '22 16:05 hauntingEcho

alias sam='sam.cmd' works for me thanks///////////

codeyourwayup avatar Dec 31 '23 09:12 codeyourwayup