@@ -214,29 +214,33 @@ func validateSettings(v hujson.Value, connectionName string) *missingSettings {
214214func settingsMessage (connectionName string , missing * missingSettings ) string {
215215 var lines []string
216216 if missing .portRange {
217- lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , serverPickPortsKey , connectionName , portRange ))
217+ lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , serverPickPortsKey , connectionName , portRange ))
218218 }
219219 if missing .platform {
220- lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , remotePlatformKey , connectionName , remotePlatform ))
220+ lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , remotePlatformKey , connectionName , remotePlatform ))
221221 }
222222 if missing .listenOnSocket {
223- lines = append (lines , fmt .Sprintf (" \" %s\" : true // Global setting that affects all remote ssh connections " , listenOnSocketKey ))
223+ lines = append (lines , fmt .Sprintf (" \" %s\" : true // Global setting" , listenOnSocketKey ))
224224 }
225225 if len (missing .extensions ) > 0 {
226226 quoted := make ([]string , len (missing .extensions ))
227227 for i , ext := range missing .extensions {
228228 quoted [i ] = fmt .Sprintf ("\" %s\" " , ext )
229229 }
230- lines = append (lines , fmt .Sprintf (" \" %s\" : [%s] // Global setting that affects all remote ssh connections " , defaultExtensionsKey , strings .Join (quoted , ", " )))
230+ lines = append (lines , fmt .Sprintf (" \" %s\" : [%s] // Global setting" , defaultExtensionsKey , strings .Join (quoted , ", " )))
231231 }
232- return strings .Join (lines , "\n " )
232+ return " { \n " + strings .Join (lines , ", \n " ) + " \n }"
233233}
234234
235235func promptUserForUpdate (ctx context.Context , ide , connectionName string , missing * missingSettings ) (bool , error ) {
236236 question := fmt .Sprintf (
237- "The following settings will be applied to %s for '%s':\n %s \n Apply these settings?" ,
237+ "The following settings will be applied to %s for '%s':\n \n %s \n \n Apply these settings?" ,
238238 getIDE (ide ).Name , connectionName , settingsMessage (connectionName , missing ))
239- return cmdio .AskYesOrNo (ctx , question )
239+ ans , err := cmdio .Ask (ctx , question + " [Y/n]" , "y" )
240+ if err != nil {
241+ return false , err
242+ }
243+ return strings .ToLower (ans ) == "y" , nil
240244}
241245
242246func handleMissingFile (ctx context.Context , ide , connectionName , settingsPath string ) error {
0 commit comments