sh¶
Runs a shell command
Allows running an arbitrary shell command.
Be aware of a specific behavior ofsh
action with regard to the working directory. For details, refer to Advanced.
sh | |
---|---|
Supported platforms | ios, android, mac |
Author | @KrauseFx |
Returns | Outputs the string and executes it. When running in tests, it returns the actual command instead of executing it |
2 Examples¶
sh("ls")
sh("git", "commit", "-m", "My message")
Parameters¶
Key | Description | Default |
---|---|---|
command |
Shell command to be executed | |
log |
Determines whether fastlane should print out the executed command itself and output of the executed command. If command line option --troubleshoot is used, then it overrides this option to true | true |
error_callback |
A callback invoked with the command output if there is a non-zero exit status |
* = default value is dependent on the user's system
To show the documentation in your terminal, run
fastlane action sh