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

[v2.8] Make runnable on windows #354

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

HarrisonWAffel
Copy link
Contributor

@HarrisonWAffel HarrisonWAffel commented Mar 19, 2024

Issue: rancher/rancher#44844

This is a backport PR of #326 for 2.8.

Signed-off-by: bakito <github@bakito.ch>
@HarrisonWAffel HarrisonWAffel marked this pull request as ready for review April 5, 2024 17:35
@HarrisonWAffel HarrisonWAffel requested a review from a team April 5, 2024 17:35
@HarrisonWAffel HarrisonWAffel changed the title [v2.8-Next2] Make runnable on windows [v2.8] Make runnable on windows Apr 5, 2024
configDir, err := ConfigDir()
if err != nil {
if runtime.GOOS == "windows" {
configDir = "%HOME%\\.rancher"

Choose a reason for hiding this comment

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

I know this is a backport but is seems to me like this should have os.ExpandEnv.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah thats a good point, though in this case configDir is only used in the usage output for the delete subcommand. Depending on the length of %HOME% the usage string might get a bit longer than needed

@HarrisonWAffel HarrisonWAffel merged commit a45136a into rancher:v2.8 Apr 5, 2024
1 check passed
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.

3 participants