File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -24,5 +24,6 @@ export function getGlobalFlags(
2424 * Returns SSH flags for the `coder ssh` command from user configuration.
2525 */
2626export function getSshFlags ( configs : WorkspaceConfiguration ) : string [ ] {
27- return configs . get < string [ ] > ( "coder.sshFlags" ) || [ ] ;
27+ // Make sure to match this default with the one in the package.json
28+ return configs . get < string [ ] > ( "coder.sshFlags" , [ "--disable-autostart" ] ) ;
2829}
Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ export class Remote {
596596 if ( useWildcardSSH ) {
597597 // User SSH flags are included first; internally-managed flags
598598 // are appended last so they take precedence.
599- const userSSHFlags = getSshFlags ( vscodeConfig ) ;
599+ const userSshFlags = getSshFlags ( vscodeConfig ) ;
600600 // Make sure to update the `coder.sshFlags` description if we add more internal flags here!
601601 const internalFlags = [
602602 "--stdio" ,
@@ -609,7 +609,7 @@ export class Remote {
609609 "%h" ,
610610 ] ;
611611
612- const allFlags = [ ...userSSHFlags , ...internalFlags ] ;
612+ const allFlags = [ ...userSshFlags , ...internalFlags ] ;
613613 return `${ escapedBinaryPath } ${ globalConfig . join ( " " ) } ssh ${ allFlags . join ( " " ) } ` ;
614614 } else {
615615 const networkInfoDir = escapeCommandArg (
Original file line number Diff line number Diff line change @@ -83,12 +83,12 @@ describe("cliConfig", () => {
8383 } ) ;
8484
8585 describe ( "getSshFlags" , ( ) => {
86- it ( "returns empty array when no SSH flags configured" , ( ) => {
86+ it ( "returns default flags when no SSH flags configured" , ( ) => {
8787 const config = {
88- get : ( ) => undefined ,
88+ get : ( _key : string , defaultValue : unknown ) => defaultValue ,
8989 } as unknown as WorkspaceConfiguration ;
9090
91- expect ( getSshFlags ( config ) ) . toStrictEqual ( [ ] ) ;
91+ expect ( getSshFlags ( config ) ) . toStrictEqual ( [ "--disable-autostart" ] ) ;
9292 } ) ;
9393
9494 it ( "returns SSH flags from config" , ( ) => {
You can’t perform that action at this time.
0 commit comments