Skip to content

Commit 1546fd6

Browse files
committed
fix: always warn on expired/deleted scratch orgs
1 parent 36d8bce commit 1546fd6

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

messages/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ No active scratch orgs found. Specify --all to see all scratch orgs.
4646

4747
# deleteOrgs
4848

49-
You have %s expired or deleted local scratch org authorizations. To remove authorizations for inactive orgs, run "org list --clean".
49+
You have %s expired or deleted local scratch org authorizations. To remove authorizations for inactive orgs, run "sf org list --clean".%s
5050

5151
# noOrgsFound
5252

src/commands/org/list.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import ansis, { type Ansis } from 'ansis';
1212
import { OrgListUtil, identifyActiveOrgByStatus } from '../../shared/orgListUtil.js';
1313
import { getStyledObject } from '../../shared/orgHighlighter.js';
1414
import { ExtendedAuthFields, FullyPopulatedScratchOrgFields } from '../../shared/orgTypes.js';
15+
import { EOL } from 'node:os';
1516

1617
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
1718
const messages = Messages.loadMessages('@salesforce/plugin-org', 'list');
@@ -87,8 +88,8 @@ export class OrgListCommand extends SfCommand<OrgListResult> {
8788
await this.cleanScratchOrgs(groupedSortedOrgs.expiredScratchOrgs, !flags['no-prompt']);
8889
}
8990

90-
if (groupedSortedOrgs.expiredScratchOrgs.length > 10 && !flags.clean) {
91-
this.warn(messages.getMessage('deleteOrgs', [groupedSortedOrgs.expiredScratchOrgs.length]));
91+
if (groupedSortedOrgs.expiredScratchOrgs.length >= 1 && !flags.clean) {
92+
this.warn(messages.getMessage('deleteOrgs', [groupedSortedOrgs.expiredScratchOrgs.length, EOL]));
9293
}
9394

9495
const result = {

0 commit comments

Comments
 (0)