Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .gitattributes #369

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Create .gitattributes #369

merged 2 commits into from
Feb 13, 2024

Conversation

jtuliani
Copy link
Contributor

@jtuliani jtuliani commented Feb 3, 2024

Issue #, if available:
n/a

Description of changes:
Create .gitattributes file

I use Windows. I found that when pulling down this repo, the LF characters are changed to CRLF (which is default git behaviour on Windows). This caused a problem with .sh files, since SAM build/deploy does not change CRLF back to LF, and the CRLF causes .sh scripts to fail.

Specifically, I was using the expressjs-zip example, and the error was /var/task/run.sh: /bin/bash^M: bad interpreter: No such file or directory

This .gitattribute file tells git not to change LF to CRLF for .sh files. With this file added, syncing the repo and using SAM to build/deploy the expressjs-zip example works correctly.

It also tells git to use LF rather than CRLF for bootstrap files, for the same reason (required for the nginx-zip example).

References:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Extend .gitattributes to use LF not CRLF for bootstrap files
@bnusunny
Copy link
Contributor

bnusunny commented Feb 4, 2024

Thanks for the PR. I need to find a windows instance to test it. :)

Copy link
Contributor

@bnusunny bnusunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bnusunny bnusunny merged commit 42eada5 into awslabs:main Feb 13, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants