mirror of
				https://github.com/gaschz/dotfiles.git
				synced 2025-11-04 13:38:58 +01:00 
			
		
		
		
	fix: whonix uwt wrapper messes with git existence
This commit is contained in:
		
							parent
							
								
									5634910c97
								
							
						
					
					
						commit
						0ef9267754
					
				@ -205,6 +205,10 @@ _get_prompt_time(){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
_git_prompt_info(){
 | 
					_git_prompt_info(){
 | 
				
			||||||
  has git || return
 | 
					  has git || return
 | 
				
			||||||
 | 
					  ## Whonix UWT wrapper circumvents the command existence check.
 | 
				
			||||||
 | 
					  if test -f /usr/share/whonix/marker; then
 | 
				
			||||||
 | 
					    git -v >/dev/null 2>&1 || return
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
  ref="$(git symbolic-ref HEAD 2>/dev/null | cut -d '/' -f3)"
 | 
					  ref="$(git symbolic-ref HEAD 2>/dev/null | cut -d '/' -f3)"
 | 
				
			||||||
  test "${ref-}" || ref="$(git describe --tags --exact-match HEAD 2>/dev/null)"
 | 
					  test "${ref-}" || ref="$(git describe --tags --exact-match HEAD 2>/dev/null)"
 | 
				
			||||||
  test "${ref-}" || ref="$(git rev-parse HEAD 2>/dev/null | head -c 7)"
 | 
					  test "${ref-}" || ref="$(git rev-parse HEAD 2>/dev/null | head -c 7)"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user