Skip to content

fix: preserve KnownHostsCommand arguments - #113

Open
ilopezluna wants to merge 1 commit into
cyjake:masterfrom
ilopezluna:fix-known-hosts-command
Open

fix: preserve KnownHostsCommand arguments#113
ilopezluna wants to merge 1 commit into
cyjake:masterfrom
ilopezluna:fix-known-hosts-command

Conversation

@ilopezluna

Copy link
Copy Markdown

Summary

  • parse KnownHostsCommand as a command with separately quoted arguments
  • preserve its separators and quotes when computing effective configuration
  • cover ESM and CommonJS parse/stringify behavior with the Remote-SSH regression case

Remote-SSH reparses and serializes the entire SSH config when adding a host. Previously this valid directive:

KnownHostsCommand "/opt/homebrew/bin/sbx" ssh known-hosts %H

was serialized as:

KnownHostsCommand "/opt/homebrew/bin/sbx ssh known-hosts %H"

This is the same directive-classification problem previously fixed for ProxyCommand in #48.

Related report: microsoft/vscode-remote-release#11780

Validation

  • npm run build
  • npm run lint
  • focused ESM regression suite: 5 passing
  • focused CommonJS regression suite: 5 passing
  • all non-DNS-dependent ESM tests: 92 passing
  • all non-DNS-dependent CommonJS tests: 82 passing

The complete local suite additionally runs canonical-domain tests that depend on resolving public DNS names; one could not resolve in this environment. GitHub CI will run the complete Node and Deno matrices.

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.

1 participant