File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,14 @@ export class Connection {
219219 writer . addCString ( "application_name" ) . addCString (
220220 this . #connection_params. applicationName ,
221221 ) ;
222- // The database expects options in the --key=value
223- writer . addCString ( "options" ) . addCString (
224- Object . entries ( this . #connection_params. options ) . map ( ( [ key , value ] ) =>
225- `--${ key } =${ value } `
226- ) . join ( " " ) ,
227- ) ;
222+
223+ const connection_options = Object . entries ( this . #connection_params. options ) ;
224+ if ( connection_options . length > 0 ) {
225+ // The database expects options in the --key=value
226+ writer . addCString ( "options" ) . addCString (
227+ connection_options . map ( ( [ key , value ] ) => `--${ key } =${ value } ` ) . join ( " " ) ,
228+ ) ;
229+ }
228230
229231 // terminator after all parameters were writter
230232 writer . addCString ( "" ) ;
You can’t perform that action at this time.
0 commit comments