Re: [PATCH 1/3] git-p4: don't select shell mode using the type of the command argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 6, 2022 at 7:43 AM Joel Holdsworth <jholdsworth@xxxxxxxxxx> wrote:
> Previously, the script would invoke subprocess functions setting the
> shell argument True if the command argument was a string, setting it
> False otherwise.
>
> This patch replaces this implicit type-driven behaviour with explicit
> shell arguments specified by the caller.
>
> The apparent motive for the implict behaviour is that the subprocess
> functions do not divide command strings into args. Invoking
> subprocess.call("echo hello") will attempt to execute a program by the
> name "echo hello". With subprocess.call("echo hello", shell=True), sh
> -c "echo hello" will be executed instead, which will cause the command
> and args to be divided by spaces.
>
> Eventually, all usage of shell=True, that is not necessary for some
> purpose beyond parsing command strings, should be removed. For now,
> this patch makes the usage of shells explicit.
> ---

Missing sign-off.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux