Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article helps to execute the CLI commands when the value passed in the parameter is having white spaces.

Instructions

To You can escape the white space in the group parameter while passing the input values , there are 2 cases to run the command successfully, in two possible scenarios, based on the Operating System you are using (macOS and Windows).

Please find Find the details 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 is used. It throws an error as shown below, if you pass the value as --group "my local group":
    Parameter error: Unexpected argument: local

    Hence, To run the command can be composed by escaping successfully, escape the white spaces as using "\""my local group\"" as shown below:

    Code Block
    languageactionscript3
    themeMidnight
    --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 To run the command on the Windows operating system by escaping the white spacesuccessfully, use the escape characters like this this - ""my local group""
    An example is given  as shown below:

    Code Block
    languageactionscript3
    themeDJango
    --action runFromCsv --file "spaces.csv" --common "--action addPermissions --permissions "viewspace" --group ""my local group"""


Info

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.

...