Comments (3)
Thanks for creating this issue @jtuliani,
Your example is very specific to using a bash script which requires line endings as LF
. There might be some other examples (e.g. dotnet projects) which requires (or works) with CRLF
. So from SAM CLI's perspective we don't have enough information to take such action on behalf of customer. Taking such action might also break customer's working application if their application requires to be CRLF
line endings.
For that reason, customers can run git config --global core.autocrlf false
one time for not auto converting LF
line endings to CRLF
.
We can add this information either in troubleshooting or pre-requsite section of SAM CLI documentation. I will be checking with our documentation team about updating our pages.
from aws-sam-cli.
Would it be possible for SAM to look for CRLF
in *.sh
and bootstrap
files and if found any emit a warning to users. That would at least give users a quicker indication that these invisible characters might cause them problems. If there is a legitimate reason they can ignore but I suspect legitimate reasons for those files are rare.
from aws-sam-cli.
I like the idea of a warning as a last resort, but I would still prefer to see the CRLF fixed. I think we're over-indexing on preserving the existing experience, but why? That experience is broken. Let's fix it instead. We have Windows version of SAM, it should work in an idiomatic way for Windows users. If we're making them think about CRLF vs LF, that's not idiomatic.
The git config workaround doesn't really work. There's a good reason why converting LF to CRLF is the default git behavior on Windows, and we shouldn't require developers to change it just for the benefit of SAM. And what if they created the script rather than downloading from git? In that case the workaround is useless, and the experience is still broken.
from aws-sam-cli.
Related Issues (20)
- Bug: sam local start-api - AttributeError 'get' HOT 2
- Bug: SAM Doesn't recognize changes related to intrinsic functions HOT 3
- Feature request: allow to choose one authorizer when there's more than one HOT 4
- Bug: When running sam deploy in github ci/cd, got error Unable to export., TypeError: sequence item 0: expected str instance, bytes found HOT 8
- --image_repositories not working HOT 3
- SAM build still fails for go with `--use-container` HOT 7
- posted prematurely ... more testing required HOT 1
- Bug: sam build - FileNotFoundError, file is part of aws-sdk node module HOT 3
- Bug: sam init - AttributeError HOT 2
- Provide proper release artifacts HOT 7
- Deploy command freezes when tag containing space is provided in samconfig file HOT 2
- Bug: Unable to debug typescript sam app via VScode breakpoints HOT 2
- Concurrent requests to `sam local start-api` cause crash in _clean_decompressed_paths function and 502 in browser HOT 4
- Unable to upload artifact using SAM CLI Version 1.109.0 HOT 15
- An HTTP Client raised an unhandled exception: sequence item 0: expected str instance, bytes found HOT 4
- Is FullAccess Role secure? HOT 3
- Bug: sam local invoke - KeyError HOT 1
- Bug: sam local invoke - ReadTimeout HOT 2
- Prevent Image Build/Rebuild for sam local start-api ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sam-cli.