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