Skip to content

"No Changes to Deploy" No Longer Registers as an Error #2621

@mcarvin8

Description

@mcarvin8

Summary

In previous CLI builds, when you attempt to deploy an empty package.xml file, you would get the following Error with Exit Code 1:

Error (1): No local changes to deploy.
Try this:
To see conflicts and ignored files, run "sf project deploy preview" with any of the manifest, directory, or metadata flags.

With the latest CLI build, when you deploy an empty package.xml, you get the following message without the Error (1) message and the exit code will be 0.

No changes to deploy

I've confirmed the same behavior running locally in VS code and running in a CI/CD pipeline with the same CLI version.

Please revert this behavior so an empty package.xml will exit with error code 1.

Steps To Reproduce

  1. Deploy a package.xml with no metadata types.
  2. Confirm No local changes to deploy. and its exit code.

Expected result

Exit Code in previous CLI builds was Exit Code 1, which could be used to fail a CI/CD pipeline.

Actual result

Exit Code with the latest build is 0, which makes the CI/CD pipeline end with no failure.

System Information

Tested locally on Windows 11 (PowerShell) and in GitLab CI/CD with the latest Ubuntu container (bash shell).

{
  "architecture": "linux-x64",
  "cliVersion": "@salesforce/cli/2.21.8",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Linux 5.15.108",
  "rootPath": "/usr/lib/node_modules/@salesforce/cli",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.2 (core)",
    "@oclif/plugin-commands 3.0.7 (core)",
    "@oclif/plugin-help 6.0.7 (core)",
    "@oclif/plugin-not-found 3.0.4 (core)",
    "@oclif/plugin-plugins 4.1.9 (core)",
    "@oclif/plugin-search 1.0.8 (core)",
    "@oclif/plugin-update 4.1.4 (core)",
    "@oclif/plugin-version 2.0.8 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.5 (core)",
    "@oclif/plugin-which 3.0.11 (core)",
    "@salesforce/cli 2.21.8 (core)",
    "apex 3.0.8 (core)",
    "auth 3.0.10 (core)",
    "data 3.0.5 (core)",
    "deploy-retrieve 2.2.3 (core)",
    "info 3.0.7 (core)",
    "limits 3.0.5 (core)",
    "marketplace 1.0.10 (core)",
    "org 3.1.1 (core)",
    "packaging 1.27.10 (core)",
    "schema 3.0.8 (core)",
    "settings 2.0.9 (core)",
    "sobject 1.0.5 (core)",
    "source 3.0.3 (core)",
    "telemetry 3.1.4 (core)",
    "templates 56.0.4 (core)",
    "trust 3.1.2 (core)",
    "user 3.1.0 (core)"
  ]
}

Additional information

CLI Build 2.10.2 - Exit Code 1
previous-build-2 10 2

Latest CLI build 2.21.8 - Exit Code 0
current-build

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue or pull request that identifies or fixes a bugvalidatedVersion information for this issue has been validated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions