Skip to content

Commit

Permalink
update buildConfigItems (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstaFrode authored Aug 9, 2024
1 parent 6754315 commit 3bdebce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/console/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
if err != nil {
return cfg, err
}

out.Warn("No configuration file was found, so enter the manual configuration process:")
var rpcValus = make([]string, 0)
if len(rpc) == 0 {
for {
Expand All @@ -504,6 +504,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
} else {
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -546,6 +547,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
} else {
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -586,6 +588,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
} else {
workspace = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -630,6 +633,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
}
earnings = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -668,6 +672,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
}
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -716,6 +721,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
}
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -754,6 +760,7 @@ func buildConfigItems(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
} else {
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down Expand Up @@ -858,6 +865,7 @@ func buildAuthenticationConfig(cmd *cobra.Command) (*confile.Confile, error) {
lines, err = inputReader.ReadString('\n')
if err != nil {
out.Err(err.Error())
time.Sleep(time.Second)
continue
} else {
lines = strings.ReplaceAll(lines, "\n", "")
Expand Down

0 comments on commit 3bdebce

Please sign in to comment.