Giter VIP home page Giter VIP logo

Comments (16)

Rahuletto avatar Rahuletto commented on July 17, 2024 10

Install git from https://git-scm.com/

from doculog.

BasToTheMax avatar BasToTheMax commented on July 17, 2024 1

I don't know how to code in python, so i will send a pseudocode in here:

You could locate the path of the git.exe file https://intellipaat.com/community/23035/where-is-git-exe-located

and then do something like this:
exec_command("C:\Program Files (x86)\Git\Git.exe commit)

from doculog.

TheQuizzer avatar TheQuizzer commented on July 17, 2024

Open a Command Prompt. Run setx GCM_TRACE %UserProfile%\git. log ; this will cause the GCM to log to a file located at “%UserProfile%\git. log”.

from doculog.

TTitcombe avatar TTitcombe commented on July 17, 2024

@Rahuletto we have no control over how users have installed git. This problem exists with users who have working git, but subprocess cannot access it properly (I don't know the root cause of this)

from doculog.

gXLg avatar gXLg commented on July 17, 2024

Problem is, it is sometimes not git.exe, but git.cmd

from doculog.

pro-gamer007 avatar pro-gamer007 commented on July 17, 2024

You can probably find what it is thru the system path

from doculog.

pgamerx avatar pgamerx commented on July 17, 2024

I think that in windows, it is never installed as git.exe, it is installed as git.cmd.

I don't know how to code in python, so i will send a pseudocode in here:

You could locate the path of the git.exe file https://intellipaat.com/community/23035/where-is-git-exe-located

and then do something like this: exec_command("C:\Program Files (x86)\Git\Git.exe commit)

from doculog.

Lightninbolt986 avatar Lightninbolt986 commented on July 17, 2024

C:\Program Files (x86)\Git\

After a bit of research, it seems it may be installed in C:\Program Files\Git too.
I also found that git may be in C:\Program Files\Git\cmd\git.exe

from doculog.

L0RD-ZER0 avatar L0RD-ZER0 commented on July 17, 2024

Here is a way I came up with:

from subprocess import check_output 
from sys import stdout
from os.path import splitext


valid_ext = ['.exe', '.cmd', '.bat']
def filter_func(val: str) -> bool:
    if splitext(val)[1] in valid_ext:
        return True


where_output: list[str] = check_output(['where', 'git'])\
                                               .decode(stdout.encoding)\
                                               .split('\n')
# decode to decode bytes
# split just in case there are multiple files
# then filter to remove in case there's something which shouldn't be run

git_location = list(filter(filter_func, where_output))[0].strip()


print(git_location)

So maybe try using something this?

from doculog.

Wumpuspro avatar Wumpuspro commented on July 17, 2024

Locate the path of the git.exe to this file https://intellipaat.com/community/23035/where-is-git-exe-located

from doculog.

WhiteClueGaming avatar WhiteClueGaming commented on July 17, 2024

Instead of subprocess.check_output["git", "log"]) use subprocess.check_output["git", "log"], stdin=date_proc.stdout, stdout=subprocess.PIPE)

from doculog.

Assassin-1234 avatar Assassin-1234 commented on July 17, 2024

please create a pull request fixing the issue mentioned above

from doculog.

Assassin-1234 avatar Assassin-1234 commented on July 17, 2024

@L0RD-ZER0 can I have your discord tag?

from doculog.

L0RD-ZER0 avatar L0RD-ZER0 commented on July 17, 2024

@L0RD-ZER0 can I have your discord tag?

You can useThe One#9690 to get in touch.

from doculog.

pgamerx avatar pgamerx commented on July 17, 2024

Wasn't this fixed in fa6018b

from doculog.

TTitcombe avatar TTitcombe commented on July 17, 2024

@pgamerx That's correct. Thanks, closing now.

Fixed by #29

from doculog.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.