File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ export class OrgListCommand extends SfdxCommand {
107107 } catch ( e ) {
108108 const err = e as SfdxError ;
109109 this . logger . debug ( `Error cleaning org ${ fields . username } : ${ err . message } ` ) ;
110+ this . ux . warn (
111+ `Unable to clean org with username ${ fields . username } . You can run "sfdx force:org:delete -u ${ fields . username } " to remove it.`
112+ ) ;
110113 }
111114 } )
112115 ) ;
Original file line number Diff line number Diff line change @@ -133,7 +133,15 @@ export class OrgListUtil {
133133 const config = ( await ConfigAggregator . create ( ) ) . getConfig ( ) ;
134134
135135 for ( const authInfo of authInfos ) {
136- const currentValue = OrgListUtil . removeRestrictedInfoFromConfig ( authInfo . getFields ( ) ) as ExtendedAuthFields ;
136+ let currentValue : ExtendedAuthFields ;
137+ try {
138+ currentValue = OrgListUtil . removeRestrictedInfoFromConfig ( authInfo . getFields ( true ) ) ;
139+ } catch ( error ) {
140+ const logger = await OrgListUtil . retrieveLogger ( ) ;
141+ logger . warn ( `Error decrypting ${ authInfo . getUsername ( ) } ` ) ;
142+ currentValue = OrgListUtil . removeRestrictedInfoFromConfig ( authInfo . getFields ( ) ) ;
143+ }
144+
137145 const [ alias , lastUsed ] = await Promise . all ( [
138146 getAliasByUsername ( currentValue . username ) ,
139147 fs . stat ( join ( Global . DIR , `${ currentValue . username } .json` ) ) ,
You can’t perform that action at this time.
0 commit comments