@@ -218,29 +218,33 @@ func validateSettings(v hujson.Value, connectionName string) *missingSettings {
218218func settingsMessage (connectionName string , missing * missingSettings ) string {
219219 var lines []string
220220 if missing .portRange {
221- lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , serverPickPortsKey , connectionName , portRange ))
221+ lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , serverPickPortsKey , connectionName , portRange ))
222222 }
223223 if missing .platform {
224- lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , remotePlatformKey , connectionName , remotePlatform ))
224+ lines = append (lines , fmt .Sprintf (" \" %s\" : {\" %s\" : \" %s\" }" , remotePlatformKey , connectionName , remotePlatform ))
225225 }
226226 if missing .listenOnSocket {
227- lines = append (lines , fmt .Sprintf (" \" %s\" : true // Global setting that affects all remote ssh connections " , listenOnSocketKey ))
227+ lines = append (lines , fmt .Sprintf (" \" %s\" : true // Global setting" , listenOnSocketKey ))
228228 }
229229 if len (missing .extensions ) > 0 {
230230 quoted := make ([]string , len (missing .extensions ))
231231 for i , ext := range missing .extensions {
232232 quoted [i ] = fmt .Sprintf ("\" %s\" " , ext )
233233 }
234- lines = append (lines , fmt .Sprintf (" \" %s\" : [%s] // Global setting that affects all remote ssh connections " , defaultExtensionsKey , strings .Join (quoted , ", " )))
234+ lines = append (lines , fmt .Sprintf (" \" %s\" : [%s] // Global setting" , defaultExtensionsKey , strings .Join (quoted , ", " )))
235235 }
236- return strings .Join (lines , "\n " )
236+ return " { \n " + strings .Join (lines , ", \n " ) + " \n }"
237237}
238238
239239func promptUserForUpdate (ctx context.Context , ide , connectionName string , missing * missingSettings ) (bool , error ) {
240240 question := fmt .Sprintf (
241- "The following settings will be applied to %s for '%s':\n %s \n Apply these settings?" ,
241+ "The following settings will be applied to %s for '%s':\n \n %s \n \n Apply these settings?" ,
242242 getIDE (ide ).Name , connectionName , settingsMessage (connectionName , missing ))
243- return cmdio .AskYesOrNo (ctx , question )
243+ ans , err := cmdio .Ask (ctx , question + " [Y/n]" , "y" )
244+ if err != nil {
245+ return false , err
246+ }
247+ return strings .ToLower (ans ) == "y" , nil
244248}
245249
246250func handleMissingFile (ctx context.Context , ide , connectionName , settingsPath string ) error {
0 commit comments