Don't pass shell=True to core.run_command() #253

Merged
merged 1 commit into from May 9, 2014

Conversation

Projects
None yet
2 participants
@living180
Contributor

living180 commented May 8, 2014

On Windows, the Git.execute() method was passing shell=True to the core.run_command() function. This was to avoid a console window briefly popping up on the screen each time git-cola invoked git, which could happen if git-cola was invoked using start pythonw git-cola. But, using shell=True is generally undesirable. This change stops passing shell=True and instead creates a STARTUPINFO structure and configures it to ensure that any child process window is hidden.

Because the Windows shell is no longer being invoked, the replace_carot function is no longer needed and is removed.

git: don't pass shell=True to core.run_command()
On Windows, the Git.execute() method was passing shell=True to the
core.run_command() function.  This was to avoid a console window briefly
popping up on the screen each time git-cola invoked git, which could
happen if git-cola was invoked using "start pythonw git-cola".  But,
using shell=True is generally undesirable.  This change stops passing
shell=True and instead creates a STARTUPINFO structure and configures it
to ensure that any child process window is hidden.

Because the Windows shell is no longer being invoked, the replace_carot
function is no longer needed and is removed.

Signed-off-by: Daniel Harding <dharding@living180.net>
@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid May 9, 2014

Member

Nicely done. 👍

Member

davvid commented May 9, 2014

Nicely done. 👍

davvid added a commit that referenced this pull request May 9, 2014

Merge pull request #253 from living180/no_shell_subprocess
Don't pass shell=True to core.run_command()

@davvid davvid merged commit 92ed6c3 into git-cola:master May 9, 2014

@living180 living180 deleted the living180:no_shell_subprocess branch May 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment