-
Notifications
You must be signed in to change notification settings - Fork 20
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
New approach to setup user-env on UNIX #94
Conversation
414367d
to
d7a8700
Compare
That sounds perfectly fine. Now that #93 is merged, I'll take a closer look at this. |
@edassis Oh, this might need to be re-based off main since you had updated the other PR since this one was branched off that. Or at least updated however you prefer. |
d7a8700
to
5fa352f
Compare
Did a rebase onto The install test failed at the checksum verification. Could it be a network instability on the Github CI? It's possible to force a rerun? |
5fa352f
to
a12db47
Compare
2039213
to
aa6e3ee
Compare
An 'env' file is created now, heavily inspired by the rust's cargo approach (See chickensoft-games#65), located in '~/.config/godotenv/env'. It's generated by GodotEnv and contains commands in 'sh' syntax to setup the user shell. The new 'env' file is responsible for: - Prepend the GodotEnv bin folder path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Fixes chickensoft-games#65
aa6e3ee
to
652415b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳 ty!
An 'env' file is created now, heavily inspired by the rust's cargo approach (See #65), located in '~/.config/godotenv/env'. It's generated by GodotEnv and contains commands in 'sh' syntax to set up the user shell.
The new 'env' file is responsible for:
We expect all POSIX compatible shells (or able to interpret 'sh' syntax in some way,
like) to be able to load the new GodotEnv'sfish
shellenv
file.An auxiliary file was added to set up the 'fish' shell too.Note
In the main branch, GodotEnv tryes to configure "PATH" and "GODOT" env-vars using heuristcs to detect the user default shell. But it showed itself cumbersome and only supported
![Captura de tela 2025-01-28 130115](https://private-user-images.githubusercontent.com/31329807/408381481-f5e40c6f-ee27-43e4-b5dc-24f44a19deed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MTI0NzAsIm5iZiI6MTczOTUxMjE3MCwicGF0aCI6Ii8zMTMyOTgwNy80MDgzODE0ODEtZjVlNDBjNmYtZWUyNy00M2U0LWI1ZGMtMjRmNDRhMTlkZWVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA1NDkzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhZTkxNjRjNWRkZTgzM2I0OGQyNDQzN2U5ZGE2NGRjNWVhZTlhYmMyZjkxOTdjNjdhMzI4OWE4YTkzMTE3NjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-LGKmo5qd7CIxhRRtHhi4zecHI6cobIUkglAwmSXkIo)
bash
andzsh
shells. The new approach usessh
shell when necessary (forGetUserEnv()
basically) and is indiferrent about the user's default shell, what I think it's a big plus.Although, with the changes in this PR, currently GodotEnv users will have
PATH
andGODOT
exports in their shell rc file and those will not be cleaned up automatically. I thought in making a note about it in the release telling people to just removes those lines. We could do some logic trying to detect it and clean them, but for the sake of making the code simple I prefered to not do it (what your thoughts?), and in case the user not removes them it will not affect the GodotEnv's functionality.Fixes #65
Let me know what you think.
The relevant commit it's the last one (has the same title as this PR), the others commits are from PR #93 waiting for merge.(rebased onto main)