Skip to content

Unable to execute git add command #975

@ghost

Description

g = git.Git('./git')
// Make some changes to package.json
g.execute("git", "add", "package.json")

Throws error:

    g.execute("git", "add", "package.json")
  File "/Users/irmantas/projects/app/venv/lib/python3.7/site-packages/git/cmd.py", line 741, in execute
    **subprocess_kwargs
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 753, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1376, in _get_handles
    p2cread = stdin.fileno()
AttributeError: 'str' object has no attribute 'fileno'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions