From 1546fd6b9e81541faf406c791c35685e4519b9c1 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Wed, 14 Jan 2026 20:17:19 -0300 Subject: [PATCH 1/2] fix: always warn on expired/deleted scratch orgs --- messages/list.md | 2 +- src/commands/org/list.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/messages/list.md b/messages/list.md index 7378a289..2b154f10 100644 --- a/messages/list.md +++ b/messages/list.md @@ -46,7 +46,7 @@ No active scratch orgs found. Specify --all to see all scratch orgs. # deleteOrgs -You have %s expired or deleted local scratch org authorizations. To remove authorizations for inactive orgs, run "org list --clean". +You have %s expired or deleted local scratch org authorizations. To remove authorizations for inactive orgs, run "sf org list --clean".%s # noOrgsFound diff --git a/src/commands/org/list.ts b/src/commands/org/list.ts index dd5a305b..f7f5f7a2 100644 --- a/src/commands/org/list.ts +++ b/src/commands/org/list.ts @@ -12,6 +12,7 @@ import ansis, { type Ansis } from 'ansis'; import { OrgListUtil, identifyActiveOrgByStatus } from '../../shared/orgListUtil.js'; import { getStyledObject } from '../../shared/orgHighlighter.js'; import { ExtendedAuthFields, FullyPopulatedScratchOrgFields } from '../../shared/orgTypes.js'; +import { EOL } from 'node:os'; Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'list'); @@ -87,8 +88,8 @@ export class OrgListCommand extends SfCommand { await this.cleanScratchOrgs(groupedSortedOrgs.expiredScratchOrgs, !flags['no-prompt']); } - if (groupedSortedOrgs.expiredScratchOrgs.length > 10 && !flags.clean) { - this.warn(messages.getMessage('deleteOrgs', [groupedSortedOrgs.expiredScratchOrgs.length])); + if (groupedSortedOrgs.expiredScratchOrgs.length >= 1 && !flags.clean) { + this.warn(messages.getMessage('deleteOrgs', [groupedSortedOrgs.expiredScratchOrgs.length, EOL])); } const result = { From 25348d12a3d01d177fe4be527cefe9411c04c805 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Thu, 15 Jan 2026 10:18:11 -0300 Subject: [PATCH 2/2] chore: lint --- src/commands/org/list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/org/list.ts b/src/commands/org/list.ts index f7f5f7a2..d18da166 100644 --- a/src/commands/org/list.ts +++ b/src/commands/org/list.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { EOL } from 'node:os'; import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core'; import { AuthInfo, ConfigAggregator, ConfigInfo, Connection, Org, SfError, Messages, Logger } from '@salesforce/core'; import { Interfaces } from '@oclif/core'; @@ -12,7 +13,6 @@ import ansis, { type Ansis } from 'ansis'; import { OrgListUtil, identifyActiveOrgByStatus } from '../../shared/orgListUtil.js'; import { getStyledObject } from '../../shared/orgHighlighter.js'; import { ExtendedAuthFields, FullyPopulatedScratchOrgFields } from '../../shared/orgTypes.js'; -import { EOL } from 'node:os'; Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-org', 'list');