mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	fix(cli): fix commit.gpgsign test in omz pr test
				
					
				
			Since `set -e` is enabled, when `commit.gpgsign` is not set the `git config` command would show an error. Given that it is technically not ignored, the subshell would exit. With this change, the `commit.gpgsign` setting is properly tested by doing the fallback test if the command fails, so no exit status code ends up quiting the subshell.
This commit is contained in:
		@@ -578,8 +578,9 @@ function _omz::pr::test {
 | 
			
		||||
      # Back up commit.gpgsign setting: use --local to get the current repository
 | 
			
		||||
      # setting, not the global one. If --local is not a known option, it will
 | 
			
		||||
      # exit with a 129 status code.
 | 
			
		||||
      gpgsign=$(command git config --local commit.gpgsign 2>/dev/null)
 | 
			
		||||
      [[ $? -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null)
 | 
			
		||||
      if ! gpgsign=$(command git config --local commit.gpgsign 2>/dev/null); then
 | 
			
		||||
        [[ $? -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null)
 | 
			
		||||
      fi
 | 
			
		||||
      command git config commit.gpgsign false
 | 
			
		||||
 | 
			
		||||
      command git rebase master ohmyzsh/pull-$1 || {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user