File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,8 +59,10 @@ export abstract class ProjectCommand extends Command {
5959 header : flags . string ( {
6060 multiple : true ,
6161 parse : header => {
62- const [ key , value ] = header . split ( ":" ) ;
63- return JSON . stringify ( { [ key . trim ( ) ] : value . trim ( ) } ) ;
62+ const separatorIndex = header . indexOf ( ":" ) ;
63+ const key = header . substring ( 0 , separatorIndex ) . trim ( ) ;
64+ const value = header . substring ( separatorIndex + 1 ) . trim ( ) ;
65+ return JSON . stringify ( { [ key ] : value } ) ;
6466 } ,
6567 description : "Additional headers to send to server for introspectionQuery"
6668 } ) ,
@@ -264,7 +266,7 @@ export abstract class ClientCommand extends ProjectCommand {
264266 if ( flags . endpoint ) {
265267 config . client . service = {
266268 url : flags . endpoint ,
267- headers : headersArrayToObject ( flags . headers )
269+ headers : headersArrayToObject ( flags . header )
268270 } ;
269271 }
270272
You can’t perform that action at this time.
0 commit comments