Giter VIP home page Giter VIP logo

Comments (3)

mndeveci avatar mndeveci commented on May 24, 2024

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.

normj avatar normj commented on May 24, 2024

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.

jtuliani avatar jtuliani commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.