Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Setting line endings to unix-style #95

Merged
merged 2 commits into from
Nov 17, 2019
Merged

Conversation

Pliavi
Copy link
Contributor

@Pliavi Pliavi commented Oct 1, 2019

DONE

The project was written using DOS-style line endings (CRLF) that cause some problems when using the shebang notation as seen in #93 , it caused in the gitfolio 'bin' shebang that append \r to node binary name and the Unix systems can't find it.

One of the best alternatives is to convert the source files to Unix-Style (LF).

More about: https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/

@imfunniee imfunniee added the question Further information is requested label Oct 4, 2019
@imfunniee
Copy link
Owner

what about windows?

@Pliavi
Copy link
Contributor Author

Pliavi commented Oct 6, 2019

I'm looking forward about this, but I always end in an issue about without a concrete answer.
LF endings doesn't look to be a problem in windows, and as the problem occur only because of the shebang notation and not because of Javascript it may run without problems cause Windows ignore it.

Buuuut...
In a lot of these issues people say assume LF as default isn't a good ideia (but I dunno why)
The Git converts CRLF to LF when commit and do the inverse when checkout (so the line endings in the repo should be in LF anyway, something is already wrong here), but I'm not sure about NPM and Yarn, it look like that they have a different behavior, even when the @utkarshmani1997 in #93 experienced the same in both.

Thank you to keep this open, and i'll keep searching about to get the answer from good sources and a better way to solve this ^^

@Pliavi
Copy link
Contributor Author

Pliavi commented Oct 27, 2019

Some news about, you can merge it without problems, I tried where and git on windows converts LF to CRLF on clone.
And it will not cause any problems to Windows users, and will resolve to Linux one's and Mac (Unix) too, if it behave the same way as Linux.

Maybe the problem with pushing as windows CRLF was in your git installation, as default it is recommended to be "checkout windows-style, commit unix-style"
image
You would be using the last option, and commited with CRLF.

And as said in Github help (you can use the steps to fix your autocrlf config too), use a .gitattributes to make all commits in LF makes it be in a good way to share de development between any environment, without being afraid of line ending problems when people change or mess with the "autocrlf" behavior, this file will force them to keep commiting in LF style to avoid future problems as this one in #93 .

For this PR I did what was said in GitHub Help.

@imfunniee imfunniee merged commit 1de7fd2 into imfunniee:master Nov 17, 2019
niradler pushed a commit to niradler/gitfolio that referenced this pull request Jun 24, 2020
* Update README.md

* Create FUNDING.yml

* Update README.md

* Update FUNDING.yml

* fail to run bug fix (imfunniee#62)

* added link to GH profile in username block + styling (imfunniee#59)

* bugfixes: added await for fileWrites (was hanging), added path import, url escape issue (imfunniee#58)

* added await for fileWrites (was hanging), added path import

* fixed html escaping issue with background image. +consistency

* changed default background to smaller params. only 90kb

* v.0.1.4

* Delete FUNDING.yml

* Horizontal ordering of Repos + Forks (imfunniee#66)

* decent grid layout. some weird gutter issue tho

* added neg margin to align with headings. fix a elem width.

* quick fix for single-column error when screen is very wide

* docs: add URL with port number to preview the website (imfunniee#69)

* Delete index.css

* Add files via upload

* fixed css for project + fork rows and some other (imfunniee#71)

* Fixes imfunniee#73 (imfunniee#74)

Fixes blog entry URLs with custom folder names.

* Bump lodash from 4.17.11 to 4.17.14 (imfunniee#83)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>

* Added Handles for Twitter, Linkedin and Medium to GitFolio (imfunniee#84)

* Added Handles for Twitter, Linkedin and Medium to GitFolio

* Updates README

* Updates README

* Add files via upload

* Delete blog.js

* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* update 0.1.5

-added UI
-fixed bugs
-fixed css issues
-creating a blog is now easier than ever

* Delete index.css

* Delete Circular.otf

* Delete index.js

* Update README.md

* Fixed Issues and added a UI

* Update README.md

* remove host workaround for emoji URLs since github-emoji v1.1.1 fixed it (imfunniee#94)

* Setting line endings to unix-style (imfunniee#95)

* Add gitattributes settings to LF
* TY @Pliavi 
* Converting all CRLF to LF

Co-authored-by: imfunny <36105478+imfunniee@users.noreply.github.com>
Co-authored-by: yrong1997 <yrong1997@gmail.com>
Co-authored-by: Benjamin Liden <benjamin.c.liden@gmail.com>
Co-authored-by: Gianfrancø Palumbo <gianpa@gmail.com>
Co-authored-by: traxam <tr808axm@hotmail.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rohan Mohapatra <31756343+rohanmohapatra@users.noreply.github.com>
Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
Co-authored-by: Vitor "Pliavi" Silvério <Pliavi.rpgm@gmail.com>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/usr/bin/env: ‘node\r’: No such file or directory
2 participants