mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +08:00 
			
		
		
		
	Add git to PATH (while in Cmder)
Add bundled git to PATH if we can't find git on PATH.
This commit is contained in:
		
							
								
								
									
										6
									
								
								vendor/profile.ps1
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/profile.ps1
									
									
									
									
										vendored
									
									
								
							| @@ -11,7 +11,13 @@ if( -not $env:PSModulePath.Contains($CmderModulePath) ){ | |||||||
| } | } | ||||||
|  |  | ||||||
| try { | try { | ||||||
|  |     # Check if git is on PATH, i.e. Git already installed on system | ||||||
|     Get-command -Name "git" -ErrorAction Stop >$null |     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 |     Import-Module -Name "posh-git" -ErrorAction Stop >$null | ||||||
|     $gitStatus = $true |     $gitStatus = $true | ||||||
| } catch { | } catch { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user