File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "errors"
4
5
"fmt"
5
6
"os"
6
7
"os/signal"
@@ -213,13 +214,14 @@ func main() {
213
214
},
214
215
},
215
216
Action : func (c * cli.Context ) error {
216
- if ! ((accessKeyID == "" && secretAccessKey == "" ) || (accessKeyID != "" && secretAccessKey != "" )){
217
- fmt .Println ("Must provide access key id and secret access key at the same time" )
218
- } else {
219
- db .GetDynamoSession (accessKeyID , secretAccessKey , region )
217
+ if ! ((accessKeyID == "" && secretAccessKey == "" ) || (accessKeyID != "" && secretAccessKey != "" )) {
218
+ return errors .New ("Must provide access key id and secret access key at the same time" )
219
+ } else if _ , err := db .GetDynamoSession (accessKeyID , secretAccessKey , region ); err == nil {
220
220
runPrompt (tablePrefix )
221
+ return nil
222
+ } else {
223
+ return err
221
224
}
222
- return nil
223
225
},
224
226
}
225
227
You can’t perform that action at this time.
0 commit comments