This article helps to execute the CLI commands when the value passed in the parameter is having white spaces.
Instructions
To escape the white space in the group parameter while passing the input values, there are 2 cases to run the command successfully, based on the Operating System you are using (macOS and Windows).
Please find the below details based on the Operating System:
On macOS:
While executing the command using the run parameters on macOS, sometimes it throws an error. That is because the white spaces are included in the values.
In this article, a group name my local group used. It throws an error as shown below, if you pass the value as --group "my local group":
Parameter error: Unexpected argument: local
Hence, the command can be composed by escaping the white spaces as "\""my local group\"" as shown below:--action runFromCsv --file "spaces.csv" --common "--action addPermissions --permissions "viewspace" --group "\""my local group\""
On Windows:
If the CLI command is used as --group "my local group" without escaping the white spaces, it throws an error:
Parameter error: Unexpected argument: local
To execute the command on the Windows operating system by escaping the white space, use the escape characters like this ""my local group""
An example is given below:--action runFromCsv --file "spaces.csv" --common "--action addPermissions --permissions "viewspace" --group ""my local group"""
It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter, to verify the behavior before deploying on a production environment.