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

Add execute to run a command without a shell (and use it to u-opt git usage) #217

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 9, 2021

  1. utils: add new execute utility

    This new function is similar to `run` except that it requires that the
    arguments be passed properly quoted and pre-split through an array.  It
    also will not permit the prefixing a command for execution.  The major
    difference between `run` and `execute` is that `execute` will not go
    through a shell, so parameter expansion, variable substitution, etc do
    not occur.  Additionally, because there is no shell involved, a single
    process is created rather than two processes (one for the shell, and the
    actual process being invoked).  This is required to enable using this
    action on Windows, where the process redirection does not work as the
    shell used is different.
    compnerd committed May 9, 2021
    Configuration menu
    Copy the full SHA
    d79e32f View commit details
    Browse the repository at this point in the history
  2. git: avoid invoking the git process through a shell

    Use the newly minted `execute` to directly execute the `git` process.
    This should be a slight bit faster as no new shell process needs to be
    setup.
    compnerd committed May 9, 2021
    Configuration menu
    Copy the full SHA
    7dc7a97 View commit details
    Browse the repository at this point in the history