Skip to content

Commit

Permalink
throw an error if the specified --server is not in server list (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
dopstar authored Jul 23, 2022
1 parent 0f908e8 commit 092760f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions speedtest/speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ func preprocessServers(servers []defs.Server, forceHTTPS bool, excludes, specifi
ret = append(ret, server)
}
}
if len(ret) == 0 {
error_message := fmt.Sprintf("specified server(s) not found: %v", specific)
return nil, errors.New(error_message)
}
return ret, nil
}
}
Expand Down

0 comments on commit 092760f

Please sign in to comment.