-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
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
Really fix Ubuntu/Debian setup when $PATH contains spaces #9370
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR qmk#9307 fixed the immediately visible problem (the command that was added to $HOME/.bashrc was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong - it captures the value of $PATH at the setup time, and the resulting command written out to $HOME/.bashrc will overwrite $PATH with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of $PATH in Linux includes everything which has been added to %PATH% on the Windows side; after adding that command to $HOME/.bashrc the WSL environment will no longer pick up any changes made by newly installed Windows software. Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to $HOME/.bashrc becomes exactly this: PATH="$HOME/.local/bin:$PATH" This command will use the $HOME and $PATH environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to $PATH are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces.
fauxpark
approved these changes
Jun 11, 2020
zvecr
approved these changes
Jun 11, 2020
Thanks! |
nesth
pushed a commit
to nesth/qmk_firmware
that referenced
this pull request
Jun 11, 2020
* upstream/master: (82 commits) Fix my personal keymap // Custom keymap for Kbdfans/kbd67/rev2 with improvements on Accessibility (qmk#9207) Murcielago: improve default keymap (qmk#9363) Really fix Ubuntu/Debian setup when $PATH contains spaces (qmk#9370) Fix Configurator layout data for clueboard/2x1800/2019 (qmk#9373) Fixing Iron165 VIA Keymap (qmk#9298) Fix Ubuntu/Debian setup when $PATH contains spaces (qmk#9307) Add documentation for selecting an Arm MCU (qmk#9046) [Docs] Fixed the hyperlink to `/users/_example/`. (qmk#9326) [keyboard] Project Keyboard Signature 87 (qmk#9062) Include `pointing_device_send` in docs (qmk#9185) Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (qmk#9296) [Keymap] WPM-responsive OLED animation in personal keymap (qmk#9264) Add bat43 rev2 (qmk#9319) [Keymap] Add dual layer keymap for xd002 macropad (qmk#9222) [Keyboard] Wazowski 23-19 PCB Support (qmk#9198) adds support for the atmega328 (qmk#9043) fix rgb mode selection and lighting increments for the 1894 (qmk#9336) Add Sinc keyboard (qmk#8986) Add new iris keymap 'fluffactually' (qmk#9325) kbdfans/kbd67/rev2: Fix ISO layout macro (qmk#9329) ...
Shinichi-Ohki
added a commit
to Shinichi-Ohki/qmk_firmware
that referenced
this pull request
Jun 12, 2020
* 'master' of https://github.com/qmk/qmk_firmware: (461 commits) Fix my personal keymap // Custom keymap for Kbdfans/kbd67/rev2 with improvements on Accessibility (qmk#9207) Murcielago: improve default keymap (qmk#9363) Really fix Ubuntu/Debian setup when $PATH contains spaces (qmk#9370) Fix Configurator layout data for clueboard/2x1800/2019 (qmk#9373) Fixing Iron165 VIA Keymap (qmk#9298) Fix Ubuntu/Debian setup when $PATH contains spaces (qmk#9307) Add documentation for selecting an Arm MCU (qmk#9046) [Docs] Fixed the hyperlink to `/users/_example/`. (qmk#9326) [keyboard] Project Keyboard Signature 87 (qmk#9062) Include `pointing_device_send` in docs (qmk#9185) Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (qmk#9296) [Keymap] WPM-responsive OLED animation in personal keymap (qmk#9264) Add bat43 rev2 (qmk#9319) [Keymap] Add dual layer keymap for xd002 macropad (qmk#9222) [Keyboard] Wazowski 23-19 PCB Support (qmk#9198) adds support for the atmega328 (qmk#9043) fix rgb mode selection and lighting increments for the 1894 (qmk#9336) Add Sinc keyboard (qmk#8986) Add new iris keymap 'fluffactually' (qmk#9325) kbdfans/kbd67/rev2: Fix ISO layout macro (qmk#9329) ...
turky
pushed a commit
to turky/qmk_firmware
that referenced
this pull request
Jun 13, 2020
PR qmk#9307 fixed the immediately visible problem (the command that was added to $HOME/.bashrc was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong - it captures the value of $PATH at the setup time, and the resulting command written out to $HOME/.bashrc will overwrite $PATH with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of $PATH in Linux includes everything which has been added to %PATH% on the Windows side; after adding that command to $HOME/.bashrc the WSL environment will no longer pick up any changes made by newly installed Windows software. Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to $HOME/.bashrc becomes exactly this: PATH="$HOME/.local/bin:$PATH" This command will use the $HOME and $PATH environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to $PATH are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces.
jakobaa
pushed a commit
to jakobaa/qmk_firmware
that referenced
this pull request
Jul 7, 2020
PR qmk#9307 fixed the immediately visible problem (the command that was added to $HOME/.bashrc was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong - it captures the value of $PATH at the setup time, and the resulting command written out to $HOME/.bashrc will overwrite $PATH with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of $PATH in Linux includes everything which has been added to %PATH% on the Windows side; after adding that command to $HOME/.bashrc the WSL environment will no longer pick up any changes made by newly installed Windows software. Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to $HOME/.bashrc becomes exactly this: PATH="$HOME/.local/bin:$PATH" This command will use the $HOME and $PATH environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to $PATH are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces.
BorisTestov
pushed a commit
to BorisTestov/qmk_firmware
that referenced
this pull request
May 23, 2024
PR qmk#9307 fixed the immediately visible problem (the command that was added to $HOME/.bashrc was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong - it captures the value of $PATH at the setup time, and the resulting command written out to $HOME/.bashrc will overwrite $PATH with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of $PATH in Linux includes everything which has been added to %PATH% on the Windows side; after adding that command to $HOME/.bashrc the WSL environment will no longer pick up any changes made by newly installed Windows software. Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to $HOME/.bashrc becomes exactly this: PATH="$HOME/.local/bin:$PATH" This command will use the $HOME and $PATH environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to $PATH are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
PR #9307 fixed the immediately visible problem (the command that was added to
$HOME/.bashrc
was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong — it captures the value of$PATH
at the setup time, and the resulting command written out to$HOME/.bashrc
will overwrite$PATH
with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of$PATH
in Linux includes everything which has been added to%PATH%
on the Windows side; after adding that command to$HOME/.bashrc
the WSL environment will no longer pick up any changes made by newly installed Windows software.Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to
$HOME/.bashrc
becomes exactly this:PATH="$HOME/.local/bin:$PATH"
This command will use the
$HOME
and$PATH
environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to$PATH
are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces.Types of Changes
Checklist