title | description | ms.date | monikerRange |
---|---|---|---|
CmdLine@1 - Command Line v1 task |
Run a command line with arguments. |
05/14/2024 |
<=azure-pipelines |
:::moniker range="<=azure-pipelines"
Use this task to run a program from the command prompt.
Note
There is a newer version of this task. Use CmdLine@2.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
# Command Line v1
# Run a command line with arguments.
- task: CmdLine@1
inputs:
filename: # string. Required. Tool.
#arguments: # string. Arguments.
# Advanced
#workingFolder: # string. Working folder.
#failOnStandardError: false # boolean. Fail on Standard Error. Default: false.
:::moniker-end
:::moniker range="<=azure-pipelines"
filename
- Tool
string
. Required.
The name of the tool to run. The tool should be found in your path. Optionally, a fully qualified path can be supplied, but the path must be present on the agent.
Note: You can use $(Build.SourcesDirectory)\ if you want the path relative to repo.
:::moniker-end
:::moniker range="<=azure-pipelines"
arguments
- Arguments
string
.
The arguments that are passed to the tool. Use double quotes to escape spaces.
:::moniker-end
:::moniker range="<=azure-pipelines"
workingFolder
- Working folder
string
.
Specifies the working directory to run commands. If you leave it empty, the working directory is $(Build.SourcesDirectory).
:::moniker-end
:::moniker range="<=azure-pipelines"
failOnStandardError
- Fail on Standard Error
boolean
. Default value: false
.
If the value is set to true, the task fails if any errors are written to the Standard Error stream.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range="<=azure-pipelines"
None.
:::moniker-end
There is a newer version of the Command line task at CommandLine@2.
:::moniker range="<=azure-pipelines"
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent, DeploymentGroup |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | All supported agent versions. |
Task category | Utility |
:::moniker-end