File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,10 @@ export class Set extends ConfigCommand<SetConfigCommandResult> {
4242
4343 for ( const name of Object . keys ( parsed ) ) {
4444 const value = parsed [ name ] as string ;
45+ let resolvedName = name ;
4546 try {
46- const resolvedName = this . configAggregator . getPropertyMeta ( name ) ?. newKey ?? name ;
47+ // this needs to be inside the try/catch because it can throw an error
48+ resolvedName = this . configAggregator . getPropertyMeta ( name ) ?. newKey ?? name ;
4749 if ( ! value ) {
4850 // Push a failure if users are try to unset a value with `set=`.
4951 this . pushFailure ( name , messages . createError ( 'error.ValueRequired' ) , value ) ;
@@ -79,7 +81,7 @@ export class Set extends ConfigCommand<SetConfigCommandResult> {
7981 }
8082 }
8183 } else {
82- this . pushFailure ( name , err as Error , value ) ;
84+ this . pushFailure ( resolvedName , err as Error , value ) ;
8385 }
8486 }
8587 }
You can’t perform that action at this time.
0 commit comments