Common attributes

Parameters

Every task in this library can accept the following attributes:

Attribute Description Required
executable The name of the sfdx executable. Convenient on Windows platforms where the PATH would have to be parsed to see whether sfdx.exe should be used (Windows Installer) or sfdx.cmd (npm install) No; default sfdx
failonerror When set to false this task does not fail when the underlying sfdx command returns an error. Only relevant if quiet is false. No; default true
quiet When set to true this task does not output any message. Setting this to true implies setting failonerror to false. No; default false
statusproperty The name of a property in which the status of the command should be stored. A status value of 0 means the command succeeded. No
resultproperty The name of a property in which the result of the command should be stored. Subproperties are named according to the (lowercased) JSON properties returned by each sfdx task. No
jsonproperty The name of a property in which the JSON string result of the command should be stored. Useful for complex interpretations in a Script. No

Examples

Find if a Scratch Org with a specified alias already exists:

<force-org-display quiet="true" targetusername="ciorg" statusproperty="display.status" />
<condition property="scratch.exists">
  <equals arg1="${display.status}" arg2="0" />
</condition>

Find if the Conga Composer package has already been installed:

<force-package-installed-list quiet="true" targetusername="ciorg" resultproperty="installed.list" />
<condition property="conga-composer.installed">
  <or>
    <equals arg1="${installed.list.0.subscriberpackageversionid}" arg2="04t600000001j3YAAQ" />
    <equals arg1="${installed.list.1.subscriberpackageversionid}" arg2="04t600000001j3YAAQ" />
  </or>
</condition>
      

Version: 0.0.0-master