File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1511,6 +1511,10 @@ func setupDatabaseConfig() config.DatabaseConfig {
15111511 fmt .Print ("Username is required. Database username: " )
15121512 if scanner .Scan () {
15131513 username = strings .TrimSpace (scanner .Text ())
1514+ } else {
1515+ // Handle EOF or input error - exit gracefully
1516+ fmt .Printf ("\n Error: Unable to read input. Setup cancelled.\n " )
1517+ os .Exit (1 )
15141518 }
15151519 }
15161520
Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ func (w *SetupWizard) setupConnectionSettings(config *ProviderConfig) {
143143 fmt .Print ("Username is required. Database username: " )
144144 if w .scanner .Scan () {
145145 username = strings .TrimSpace (w .scanner .Text ())
146+ } else {
147+ // Handle EOF or input error - exit gracefully
148+ fmt .Printf ("\n Error: Unable to read input. Setup cancelled.\n " )
149+ return
146150 }
147151 }
148152 config .Username = username
You can’t perform that action at this time.
0 commit comments