@@ -20,12 +20,12 @@ export function getNcurcPath() {
2020}
2121
2222let mergedConfig ;
23- export function getMergedConfig ( dir , home ) {
23+ export function getMergedConfig ( dir , home , additional ) {
2424 if ( mergedConfig == null ) {
2525 const globalConfig = getConfig ( GLOBAL_CONFIG , home ) ;
2626 const projectConfig = getConfig ( PROJECT_CONFIG , dir ) ;
2727 const localConfig = getConfig ( LOCAL_CONFIG , dir ) ;
28- mergedConfig = Object . assign ( globalConfig , projectConfig , localConfig ) ;
28+ mergedConfig = Object . assign ( globalConfig , projectConfig , localConfig , additional ) ;
2929 }
3030 return mergedConfig ;
3131} ;
@@ -41,7 +41,7 @@ export async function encryptValue(input) {
4141 {
4242 captureStdout : true ,
4343 ignoreFailure : false ,
44- spawnArgs : { input }
44+ input
4545 }
4646 ) ;
4747}
@@ -60,7 +60,11 @@ function addEncryptedPropertyGetter(target, key, input) {
6060 __proto__ : null ,
6161 configurable : true ,
6262 get ( ) {
63- console . warn ( `The config value for ${ key } is encrypted, spawning gpg to decrypt it...` ) ;
63+ // Using an error object to get a stack trace in debug mode.
64+ const warn = new Error (
65+ `The config value for ${ key } is encrypted, spawning gpg to decrypt it...`
66+ ) ;
67+ console . warn ( setOwnProperty ( warn , 'name' , 'Warning' ) ) ;
6468 const value = runSync ( process . env . GPG_BIN || 'gpg' , [ '--decrypt' ] , { input } ) ;
6569 setOwnProperty ( target , key , value ) ;
6670 return value ;
0 commit comments