File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @sql-controller/cli " : patch
3+ ---
4+
5+ Catch login error
Original file line number Diff line number Diff line change @@ -38,17 +38,22 @@ export default async function sync(options: {
3838 ...rootAccount ,
3939 log : options . verbose ,
4040 } ) ) ;
41- if (
42- await driver . checkLogin ( {
43- hostname : rootAccount . hostname ,
44- username : rootAccount . username ,
45- password : rootAccount . password ,
46- log : options . verbose ,
47- } )
48- ) {
49- successRootAccount [ alias ] = true ;
50- } else {
51- log ( "error" , alias , "Invalid root password" ) ;
41+
42+ try {
43+ if (
44+ await driver . checkLogin ( {
45+ hostname : rootAccount . hostname ,
46+ username : rootAccount . username ,
47+ password : rootAccount . password ,
48+ log : options . verbose ,
49+ } )
50+ ) {
51+ successRootAccount [ alias ] = true ;
52+ } else {
53+ log ( "error" , alias , "Invalid root password" ) ;
54+ }
55+ } catch ( error ) {
56+ log ( "error" , alias , ( error as Error ) . message ) ;
5257 }
5358 }
5459
You can’t perform that action at this time.
0 commit comments