-
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
Set GODOT environment variable in both ".bashrc" and ".bash_profile" shell configuration files on Unix #65
Comments
Hi,
Can you describe better your situation, maybe with some example? From my tests (Ubuntu), VSCode seems to source a login shell at startup, and when you open an integrated shell it's an interactive non-login shell:
Here, a table and diagram about bash/zsh's startup files calling: But this can vary, as some distros sources As we can see, the shell process initialization is tricky and can vary per shell/distro. One interesting approach to guarantee that the PATH modification is happening, independent of how the shell is being called, it's to define some separated script that checks if the PATH was already patched, if not patch it. This script would be sourced at multiple shell's startup files. It's the approach that rust's cargo tool took: $HOME/.cargo/env approach
#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
*:"$HOME/.cargo/bin":*)
;;
*)
# Prepending path in case a system-installed rustc needs to be overridden
export PATH="$HOME/.cargo/bin:$PATH"
;;
esac Maybe we could do something similar here. |
@edassis If it's good enough Rust, it's probably a good solution. I'm totally in favor of doing that. |
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 command to setup the user shell in 'sh' syntax. The new 'env' file is responsible for: - Prepend the Godot symlink path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Upfront, we got 'fish' shell support. Fixes chickensoft-games#65
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 command to setup the user shell in 'sh' syntax. The new 'env' file is responsible for: - Prepend the Godot symlink path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Upfront, we got 'fish' shell support. Fixes chickensoft-games#65
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 command to setup the user shell in 'sh' syntax. The new 'env' file is responsible for: - Prepend the Godot symlink path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Upfront, we got 'fish' shell support. Fixes chickensoft-games#65
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 command to setup the user shell in 'sh' syntax. The new 'env' file is responsible for: - Prepend the Godot symlink path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Upfront, we got 'fish' shell support. Fixes chickensoft-games#65
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 command to setup the user shell in 'sh' syntax. The new 'env' file is responsible for: - Prepend the Godot symlink path into PATH; - 'Export' GODOT env-var pointing to Godot symlink. We expect all POSIX compatible shells to work with it. Upfront, we got 'fish' shell support. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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. Was added, an auxiliary file to setup the 'fish' shell too. Fixes chickensoft-games#65
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
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
GodotEnv currently only sets the GODOT environment variable (along with changes to PATH) inside the ".bashrc" file. However, we found out through Discord discussion that on an Arch-based OS, VSCode will not read environment variables correctly unless they are set in user's ".bash_profile" file. Setting the variable in both places would allow Arch-based distros to work out of the box like the rest.
The text was updated successfully, but these errors were encountered: