Skip to content

feat: add flag for Windows to create unix compatible filepaths #8164

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

Merged
merged 4 commits into from
Jun 22, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 22, 2023

Closes #7639

@Emyrk Emyrk requested a review from mafredri June 22, 2023 20:24
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻


package cli

var hideForceUnixSlashes = true
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if it's considered good practice or not, but there's a trick you can use to avoid the build flag:

var hideForceUnixSlashes = func() bool { return runtime.GOOS == "windows" }()

I'll leave it up to you whether or not to use it (two less files might be nice). 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

I was following our other pattern. I was unsure if a build tag or that was the move

@Emyrk Emyrk merged commit 797e91d into main Jun 22, 2023
@Emyrk Emyrk deleted the stevenmasley/quote_paths branch June 22, 2023 22:08
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coder CLI on Windows: SSH ProxyCommand does not include quotes
2 participants