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 Windows path setting #5698

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Fix Windows path setting #5698

merged 1 commit into from
Apr 11, 2024

Conversation

manuelbuil
Copy link
Contributor

Proposed Changes

For some reason it was necessary to configure the PATH for RKE2 to work correctly in Windows, as explained in the docs: https://docs.rke2.io/install/quickstart#3-configure-path. The reason is that we were setting the PATH wrongly and using ":" instead of ";". One is typical for Unix systems and the other one is for Windows

Types of Changes

Bugfix

Verification

Run rke2-windows without configuring the PATH previously as set in the docs: https://docs.rke2.io/install/quickstart#3-configure-path

Testing

Linked Issues

#5697

User-Facing Change

Fix windows path setting

Further Comments

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 18.90%. Comparing base (9c0a185) to head (43f28f0).
Report is 463 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5698      +/-   ##
==========================================
- Coverage   19.18%   18.90%   -0.28%     
==========================================
  Files          25       29       +4     
  Lines        2262     2623     +361     
==========================================
+ Hits          434      496      +62     
- Misses       1790     2086     +296     
- Partials       38       41       +3     
Flag Coverage Δ
unittests 18.90% <ø> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -100,7 +100,7 @@ func (p *PEBinaryConfig) Bootstrap(ctx context.Context, nodeConfig *config.Node,
if err != nil {
return err
}
if err := os.Setenv("PATH", execPath+":"+os.Getenv("PATH")); err != nil {
if err := os.Setenv("PATH", execPath+";"+os.Getenv("PATH")); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI there is os.PathListSeparator if you want to avoid forgetting which is which on different platforms.

https://pkg.go.dev/os#pkg-constants

Signed-off-by: Manuel Buil <mbuil@suse.com>
@manuelbuil manuelbuil merged commit 85cf0fb into rancher:master Apr 11, 2024
5 checks passed
@manuelbuil manuelbuil deleted the fixWinPath branch April 11, 2024 16:59
@manuelbuil
Copy link
Contributor Author

Backports tomorrow!

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.

None yet

5 participants