Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-5704) allow array commands in exec resource #8660

Merged
merged 1 commit into from
Jun 30, 2021

Commits on Jun 30, 2021

  1. (PUP-5704) allow array commands in exec resource

    This change updates the exec resource to accept
    arrays as command. The new behaviour is enabled for
    the following parameters: `:comand`, `:onlyif`,
    `:unless`, `:refresh`.
    
    ```
    Changing the command to accept an array:
    
    command: "/bin/echo *"         # executes through shell
    command: ["/bin/echo *"]       # non-existing command "bin/echo *"
    command: ["/bin/echo *", "*"]  # non-existing command "bin/echo *"
    command: ["/bin/echo", "*"]    # executes directly
    
    onlyif/unless: '/bin/echo *'                                  # executes one command through shell
    onlyif/unless: ['/bin/echo *', '/bin/echo $SHELL']            # executes two commands through shell
    onlyif/unless: [["/bin/echo", "*"]]                           # executes one command directly
    onlyif/unless: [["/bin/echo", "*"], ["/bin/echo", "$SHELL"]]  # executes two commands directly
    ```
    gimmyxd committed Jun 30, 2021
    Configuration menu
    Copy the full SHA
    59d045b View commit details
    Browse the repository at this point in the history