This repository was archived by the owner on Aug 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -162,14 +162,16 @@ export default class LoginIndex extends Command {
162162 fs . mkdirSync ( envDir , { recursive : true } )
163163 }
164164
165- const settings = readSettingsJson ( envFilePath )
166-
167- // Prepare the JSON object with the new content
168- const newEnvContent = {
165+ const newEnvContent : { HYP_EMAIL : string ; HYP_JWT : string ; HYP_ORG_ID : string ; INSTALLATION_IDS : { [ key : string ] : string } | null } = {
169166 HYP_EMAIL : email ,
170167 HYP_JWT : jwt ,
171168 HYP_ORG_ID : orgId ,
172- INSTALLATION_IDS : settings . installationIds ,
169+ INSTALLATION_IDS : null ,
170+ } ;
171+
172+ if ( fileExists ( envFilePath ) ) {
173+ const settings = readSettingsJson ( envFilePath )
174+ newEnvContent . INSTALLATION_IDS = settings . installationIds
173175 }
174176
175177 // Write the new content to the file, replacing any existing content
Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ export function readSettingsJson(filePath: string): {
140140 jwt = jsonContent . HYP_JWT || null
141141 orgId = jsonContent . HYP_ORG_ID || null
142142 installationIds = jsonContent . INSTALLATION_IDS || null
143- } catch ( error ) {
144- console . error ( 'Error parsing JSON content:' , error )
143+ } catch {
144+ // ignore error
145145 }
146146
147147 return {
You can’t perform that action at this time.
0 commit comments