@@ -138,7 +138,7 @@ export function registerHooks(hooks: IHookEngine) {
138138}
139139
140140
141- export async function run ( pargv : string [ ] , env : { [ k : string ] : string ; } , opts : { local ?: boolean ; } = { } ) {
141+ export async function run ( pargv : string [ ] , env : { [ k : string ] : string ; } ) {
142142 const now = new Date ( ) ;
143143 let exitCode = 0 ;
144144 let err : any ;
@@ -148,23 +148,17 @@ export async function run(pargv: string[], env: { [k: string]: string; }, opts:
148148
149149 const ienv = await generateIonicEnvironment ( exports , pargv , env ) ;
150150
151- ienv . meta = {
152- local : opts . local || false ,
153- binPath : env [ 'IONIC_CLI_BIN' ] ,
154- libPath : env [ 'IONIC_CLI_LIB' ] ,
155- } ;
156-
157- registerHooks ( ienv . hooks ) ;
158-
159151 try {
160- const configData = await ienv . config . load ( ) ;
152+ const config = await ienv . config . load ( ) ;
153+
154+ registerHooks ( ienv . hooks ) ;
161155
162156 ienv . log . debug ( ( ) => util . inspect ( ienv . meta , { breakLength : Infinity , colors : chalk . enabled } ) ) ;
163157
164158 if ( env [ 'IONIC_EMAIL' ] && env [ 'IONIC_PASSWORD' ] ) {
165159 ienv . log . debug ( ( ) => `${ chalk . bold ( 'IONIC_EMAIL' ) } / ${ chalk . bold ( 'IONIC_PASSWORD' ) } environment variables detected` ) ;
166160
167- if ( configData . user . email !== env [ 'IONIC_EMAIL' ] ) {
161+ if ( config . user . email !== env [ 'IONIC_EMAIL' ] ) {
168162 ienv . log . debug ( ( ) => `${ chalk . bold ( 'IONIC_EMAIL' ) } mismatch with current session--attempting login` ) ;
169163
170164 try {
@@ -214,18 +208,18 @@ export async function run(pargv: string[], env: { [k: string]: string; }, opts:
214208 }
215209
216210 if ( ienv . flags . interactive ) {
217- if ( typeof configData . daemon . updates === 'undefined' ) {
211+ if ( typeof config . daemon . updates === 'undefined' ) {
218212 const confirm = await ienv . prompt ( {
219213 type : 'confirm' ,
220214 name : 'confirm' ,
221215 message : `The Ionic CLI can automatically check for CLI updates in the background. Would you like to enable this?` ,
222216 } ) ;
223217
224- configData . daemon . updates = confirm ;
218+ config . daemon . updates = confirm ;
225219 await ienv . config . save ( ) ;
226220 }
227221
228- if ( configData . daemon . updates ) {
222+ if ( config . daemon . updates ) {
229223 await Promise . all ( [ checkForDaemon ( ienv ) , checkForUpdates ( ienv ) ] ) ;
230224 }
231225 }
@@ -238,7 +232,7 @@ export async function run(pargv: string[], env: { [k: string]: string; }, opts:
238232 exitCode = r ;
239233 }
240234
241- configData . lastCommand = now . toISOString ( ) ;
235+ config . lastCommand = now . toISOString ( ) ;
242236 }
243237
244238 } catch ( e ) {
0 commit comments