Skip to content

[question] How to interpret env param in Repo.clone_from #924

Description

@pared

Hi!
Problem: recently I stumbled upon a problem when cloning when git used LD_LIBRARY_PATH that I thought I deleted.

It turned out, that here environment is updated with provided env. I thought that env param will be "copied" as a working environment, rather than used to update some pre-existing one.

My problem was fixed by setting the variable value to an empty string.

In docs of execute method, env param is described as follows:

env – A dictionary of environment variables to be passed to subprocess.Popen.

This sounds like the env will be used "as is".

Same name of parameter in clone_from led me to believe that the behaviour will be similar there.

Question:
Is this behavior intentional?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions