We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7fae20f + aa2e612 commit ed10c6bCopy full SHA for ed10c6b
src/commands/force/org/display.ts
@@ -27,6 +27,13 @@ export class OrgDisplayCommand extends SfdxCommand {
27
};
28
29
public async run(): Promise<OrgDisplayReturn> {
30
+ try {
31
+ // the auth file might have a stale access token. We want to refresh it before getting the fields
32
+ await this.org.refreshAuth();
33
+ } catch (error) {
34
+ // even if this fails, we want to display the information we can read from the auth file
35
+ this.ux.warn('unable to refresh auth for org');
36
+ }
37
// translate to alias if necessary
38
const authInfo = await AuthInfo.create({ username: this.org.getUsername() });
39
const fields = authInfo.getFields(true);
0 commit comments