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

bash: ./script: cannot execute: required file not found #13

Open
JeanGarf opened this issue Mar 13, 2024 · 3 comments
Open

bash: ./script: cannot execute: required file not found #13

JeanGarf opened this issue Mar 13, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@JeanGarf
Copy link
Collaborator

JeanGarf commented Mar 13, 2024

BUG
On Windows, after "docker compose up -d", we get the following error :

bash: ./script: cannot execute: required file not found

ANALYSIS
This is due to the fact that *.sh file are CRLF instead of LF

EXPECTED CORRECTION
Add .gitattributes to checkout *.sh with LF

@JeanGarf JeanGarf added the bug Something isn't working label Mar 13, 2024
@JeanGarf JeanGarf self-assigned this Mar 13, 2024
@Jean-Baptiste-Lasselle
Copy link
Contributor

LF

git has configuration to automatically convert between CRLF and LF see https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#global-settings-for-line-endings

Also: can you give copy paste of full logs, just to see ?

@Jean-Baptiste-Lasselle
Copy link
Contributor

BUG On Windows, after "docker compose up -d", we get the following error :

bash: ./script: cannot execute: required file not found

ANALYSIS This is due to the fact that *.sh file are CRLF instead of LF

EXPECTED CORRECTION Add .gitattributes to checkout *.sh with LF

I have one question:

  • If you configure your git to always, auto convert CRLF/LF
  • Do you still have the issue you experienced ? (Intoher words, does it solve the issue ?)

@JeanGarf
Copy link
Collaborator Author

En modifiant le .gitattributes dans le projet, comme j'ai commencé à le faire dans la branche feature/#13_sh_lf, ça sera valable pour toute personne qui clone le repo, alors que si je le fais dans mon .gitattributes perso, ça ne fonctionnera que chez moi.

Par contre, il faut peut-être que je le complète encore.

On verra ça samedi, car j'ai essayé de re-générer mes images Docker et ça a fini par re-marcher, mais j'ai dû relancer le "docker compose up -d" une bonne dizaine de fois

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants