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

gh cs ssh --config does not add quotes to the CLI path on Windows #8907

Open
darvld opened this issue Apr 1, 2024 · 0 comments
Open

gh cs ssh --config does not add quotes to the CLI path on Windows #8907

darvld opened this issue Apr 1, 2024 · 0 comments
Labels
bug Something isn't working needs-triage needs to be reviewed

Comments

@darvld
Copy link

darvld commented Apr 1, 2024

Describe the bug

When running gh cs ssh --config, the configuration will contain a proxy command, which uses the GitHub CLI. On Windows, the path to the CLI binary used in that command is not quoted even when it contains whitespaces, causing problems with applications that attempt to use it to connect via ssh.

Manually editing the generated configuration to add the missing quotes allows normal use of the proxy command.

Version 2.46.0 (2024-03-20)

Steps to reproduce the behavior

  1. On Windows, run gh cs ssh --config.
  2. See the ProxyCommand section of the output: ProxyCommand C:\Program Files\GitHub CLI\gh.exe cs ssh ....
  3. Notice the path to the CLI: C:\Program Files\GitHub CLI\gh.exe, which should be quoted as it contains whitespaces.

Expected vs actual behavior

The CLI should output a quoted path to the binary when required:

  • Expected: ProxyCommand "C:\Program Files\GitHub CLI\gh.exe" cs ssh ...
  • Actual: ProxyCommand C:\Program Files\GitHub CLI\gh.exe cs ssh ...
@darvld darvld added the bug Something isn't working label Apr 1, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants