@@ -25,7 +25,7 @@ type EnvCommandContext = GlobalOptions & {
2525export const envListCommand = new Command < EnvCommandContext > ( )
2626 . description ( "List all environmental variables in an application" )
2727 . action ( async ( options ) => {
28- const configContent = await readConfig ( Deno . cwd ( ) ) ;
28+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
2929 let { org, app } = getAppFromConfig ( configContent ) ;
3030 org ??= options . org ;
3131 app ??= options . app ;
@@ -112,7 +112,7 @@ export const envAddCommand = new Command<EnvCommandContext>()
112112 . option ( "--secret" , "If the value should be secret" , { default : false } )
113113 . arguments ( "<variable:string> <value:string>" )
114114 . action ( async ( options , variable , value ) => {
115- const configContent = await readConfig ( Deno . cwd ( ) ) ;
115+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
116116 let { org, app } = getAppFromConfig ( configContent ) ;
117117 org ??= options . org ;
118118 app ??= options . app ;
@@ -159,7 +159,7 @@ export const envUpdateValueCommand = new Command<EnvCommandContext>()
159159 )
160160 . arguments ( "<variable:string> <value:string>" )
161161 . action ( async ( options , variable , value ) => {
162- const configContent = await readConfig ( Deno . cwd ( ) ) ;
162+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
163163 let { org, app } = getAppFromConfig ( configContent ) ;
164164 org ??= options . org ;
165165 app ??= options . app ;
@@ -209,7 +209,7 @@ You can define no contexts, which is the equivalent to "All"`,
209209 )
210210 . arguments ( "<variable:string> [new-contexts...:string]" )
211211 . action ( async ( options , variable , ...newContexts ) => {
212- const configContent = await readConfig ( Deno . cwd ( ) ) ;
212+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
213213 let { org, app } = getAppFromConfig ( configContent ) ;
214214 org ??= options . org ;
215215 app ??= options . app ;
@@ -274,7 +274,7 @@ export const envDeleteCommand = new Command<EnvCommandContext>()
274274 . description ( "Delete an environmental variable in the application" )
275275 . arguments ( "variable:string" )
276276 . action ( async ( options , variable ) => {
277- const configContent = await readConfig ( Deno . cwd ( ) ) ;
277+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
278278 let { org, app } = getAppFromConfig ( configContent ) ;
279279 org ??= options . org ;
280280 app ??= options . app ;
@@ -324,7 +324,7 @@ export const envLoadCommand = new Command<EnvCommandContext>()
324324 )
325325 . arguments ( "<file:string>" )
326326 . action ( async ( options , file ) => {
327- const configContent = await readConfig ( Deno . cwd ( ) ) ;
327+ const configContent = await readConfig ( Deno . cwd ( ) , options . config ) ;
328328 let { org, app } = getAppFromConfig ( configContent ) ;
329329 org ??= options . org ;
330330 app ??= options . app ;
0 commit comments