diff --git a/src/commands/agent/publish/authoring-bundle.ts b/src/commands/agent/publish/authoring-bundle.ts index b7e3cf5d..18180b69 100644 --- a/src/commands/agent/publish/authoring-bundle.ts +++ b/src/commands/agent/publish/authoring-bundle.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { EOL } from 'node:os'; -import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; +import { SfCommand, Flags, toHelpSection } from '@salesforce/sf-plugins-core'; import { MultiStageOutput } from '@oclif/multi-stage-output'; import { Messages, Lifecycle, SfError } from '@salesforce/core'; import { Agent } from '@salesforce/agents'; @@ -38,6 +38,11 @@ export default class AgentPublishAuthoringBundle extends SfCommand( `agent publish authoring-bundle --api-name ${invalidApiName} --target-org ${getUsername()} --json`, - { ensureExitCode: 2 } + { ensureExitCode: 1 } ); }); @@ -193,8 +193,8 @@ describe('agent publish authoring-bundle NUTs', function () { } catch (error) { const message = error instanceof Error ? error.message : String(error); // We assert both the "publish failed" prefix and that it looks like a compilation issue. - expect(message).to.include("SyntaxError: Unexpected 'syem'"); - expect(message).to.match(/Actual:\s*2\b|"exitCode"\s*:\s*2/); + expect(message).to.include('CompilationError: Invalid string'); + expect(message).to.match(/Actual:\s*2\b|"exitCode"\s*:\s*1/); } });