File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 55 getEmbedderOptions : getEmbedderOptionsFromBinding ,
66} = internalBinding ( 'options' ) ;
77
8+ const {
9+ StringPrototypeSlice,
10+ } = primordials ;
11+
812let warnOnAllowUnauthorized = true ;
913
1014let optionsMap ;
@@ -43,8 +47,15 @@ function refreshOptions() {
4347
4448function getOptionValue ( optionName ) {
4549 const options = getCLIOptionsFromBinding ( ) ;
46- if ( optionName . startsWith ( '--no-' ) ) {
47- const option = options . get ( '--' + optionName . slice ( 5 ) ) ;
50+ if (
51+ optionName . length > 5 &&
52+ optionName [ 0 ] === '-' &&
53+ optionName [ 1 ] === '-' &&
54+ optionName [ 2 ] === 'n' &&
55+ optionName [ 3 ] === 'o' &&
56+ optionName [ 4 ] === '-'
57+ ) {
58+ const option = options . get ( '--' + StringPrototypeSlice ( optionName , 5 ) ) ;
4859 return option && ! option . value ;
4960 }
5061 return options . get ( optionName ) ?. value ;
You can’t perform that action at this time.
0 commit comments