mirror of
https://github.com/coder/coder.git
synced 2026-09-01 14:53:15 +08:00
chore: unhide flag to force unix filepaths in config-ssh (#25142)
Docs now include this flag. This flag is now also viewable in linux/mac despite it effectively being a `no-op`. Closes https://github.com/coder/coder/issues/24205
This commit is contained in:
@@ -566,11 +566,6 @@ func (r *RootCmd) configSSH() *serpent.Command {
|
||||
"This might be an issue in Windows machine that use a unix-like shell. " +
|
||||
"This flag forces the use of unix file paths (the forward slash '/').",
|
||||
Value: serpent.BoolOf(&sshConfigOpts.forceUnixSeparators),
|
||||
// On non-windows showing this command is useless because it is a noop.
|
||||
// Hide vs disable it though so if a command is copied from a Windows
|
||||
// machine to a unix machine it will still work and not throw an
|
||||
// "unknown flag" error.
|
||||
Hidden: hideForceUnixSlashes,
|
||||
},
|
||||
cliui.SkipPromptOption(),
|
||||
}
|
||||
|
||||
@@ -12,11 +12,6 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// For golden files, always show the flag.
|
||||
hideForceUnixSlashes = false
|
||||
}
|
||||
|
||||
func Test_sshConfigSplitOnCoderSection(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import (
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
var hideForceUnixSlashes = true
|
||||
|
||||
// sshConfigMatchExecEscape prepares the path for use in `Match exec` statement.
|
||||
//
|
||||
// OpenSSH parses the Match line with a very simple tokenizer that accepts "-enclosed strings for the exec command, and
|
||||
|
||||
@@ -9,9 +9,6 @@ import (
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// Must be a var for unit tests to conform behavior
|
||||
var hideForceUnixSlashes = false
|
||||
|
||||
// sshConfigMatchExecEscape prepares the path for use in `Match exec` statement.
|
||||
//
|
||||
// OpenSSH parses the Match line with a very simple tokenizer that accepts "-enclosed strings for the exec command, and
|
||||
|
||||
Generated
+9
@@ -108,6 +108,15 @@ Specifies whether or not to wait for the startup script to finish executing. Aut
|
||||
|
||||
Disable starting the workspace automatically when connecting via SSH.
|
||||
|
||||
### --force-unix-filepaths
|
||||
|
||||
| | |
|
||||
|-------------|----------------------------------------------|
|
||||
| Type | <code>bool</code> |
|
||||
| Environment | <code>$CODER_CONFIGSSH_UNIX_FILEPATHS</code> |
|
||||
|
||||
By default, 'config-ssh' uses the os path separator when writing the ssh config. This might be an issue in Windows machine that use a unix-like shell. This flag forces the use of unix file paths (the forward slash '/').
|
||||
|
||||
### -y, --yes
|
||||
|
||||
| | |
|
||||
|
||||
Reference in New Issue
Block a user