Skip to content

Commit

Permalink
Add git to PATH (while in Cmder)
Browse files Browse the repository at this point in the history
Add bundled git to PATH if we can't find git on PATH.
  • Loading branch information
MartiUK committed May 19, 2015
1 parent c15e29e commit 29d1378
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vendor/profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ if( -not $env:PSModulePath.Contains($CmderModulePath) ){
}

try {
# Check if git is on PATH, i.e. Git already installed on system
Get-command -Name "git" -ErrorAction Stop >$null
} catch {
$env:Path += ";$env:CMDER_ROOT\vendor\msysgit\bin"
}

try {
Import-Module -Name "posh-git" -ErrorAction Stop >$null
$gitStatus = $true
} catch {
Expand Down

10 comments on commit 29d1378

@killua99
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using this patch, and work

@guilhermemarconi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work here. I'm using Windows 10. 😔

@0xhmn
Copy link

@0xhmn 0xhmn commented on 29d1378 Aug 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here. Doesn't work on Windows 10

@jk2K
Copy link

@jk2K jk2K commented on 29d1378 Aug 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here. Doesn't work on Windows 10

@vaer-k
Copy link

@vaer-k vaer-k commented on 29d1378 Aug 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this patch solved the issue for me on Windows 10.

@gitlie
Copy link

@gitlie gitlie commented on 29d1378 Aug 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I'm super noob to all this, where do I add this code? do I copy and paste it to somewhere?
i'm getting the 'WARNING: missing git support' message and assume that this is the fix but not sure how to apply it.

@Ayyaaz
Copy link

@Ayyaaz Ayyaaz commented on 29d1378 Sep 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch worked for me on Windows 10.

@brentonklassen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch worked for me on Windows 10.

@erangel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for Windows 10

@biociao
Copy link

@biociao biociao commented on 29d1378 Oct 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worked on win7 ! Thx!

Please sign in to comment.