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

Fix for #911, CRLF line endings on Linux scripts. #1054

Merged
merged 2 commits into from
Oct 14, 2023
Merged

Fix for #911, CRLF line endings on Linux scripts. #1054

merged 2 commits into from
Oct 14, 2023

Conversation

automaton82
Copy link
Contributor

As per #911, the line endings on the Linux scripts are CRLF which do not work properly if a Docker build is created on Windows. To solve this, the line endings are converted to LF in source.

@HenryHengZJ
Copy link
Contributor

awesome thanks @automaton82 for the fix!

@HenryHengZJ
Copy link
Contributor

do you mind pulling latest changes from main branch to get the Node CI pass?

@automaton82
Copy link
Contributor Author

Sure I did a sync just now. Hopefully that solves it.

@automaton82
Copy link
Contributor Author

I think they passed now, so it seems to have worked.

@HenryHengZJ HenryHengZJ merged commit af7a808 into FlowiseAI:main Oct 14, 2023
@HenryHengZJ
Copy link
Contributor

Render deployment failed:
image

Looks like we need to revert this

@automaton82
Copy link
Contributor Author

Looks like a permissions issue on the file when in docker. But the permissions don't come from the host machine, so I'm not sure how it could be related. That's odd.

@HenryHengZJ
Copy link
Contributor

Yeah, merged the revert PR and it fixed the issue. Not sure what was the cause of it

@automaton82
Copy link
Contributor Author

Ok. I'll try to replicate. The way it is now won't docker run in Windows, so there must be a way to fix both.

@automaton82
Copy link
Contributor Author

@HenryHengZJ I think I can fix this by following https://stackoverflow.com/questions/30195151/can-i-commit-specific-files-in-git-without-affecting-the-original-line-ending and adding a .gitattributes file into that folder targeting only run and dev files to have LF line endings. This would mean no changes to the actual files.

I have this working locally in Windows, but I'm now going to test it on Ubuntu WSL2 Linux. If it passes both of these, are you okay if I submit another PR with this file added to solve this instead of the failed way?

@automaton82
Copy link
Contributor Author

Well I submitted a new PR #1077 which I tested to ensure it would run on Linux and Windows. It's a 1 file addition for git to deal with the line endings, and no changes to the actual files to avoid any permissions issues again.

Hopefully this is ok. It does fix it, as long as the file is touched by git (or re-cloned).

hemati pushed a commit to hemati/Flowise that referenced this pull request Dec 27, 2023
Fix for FlowiseAI#911, CRLF line endings on Linux scripts.
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