Merge pull request #14667 from carlocab/update-reset-tap-names
cmd/update-reset: improve arg parsing
This commit is contained in:
		
						commit
						1201f18db0
					
				
							
								
								
									
										2
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							@ -105,8 +105,6 @@ jobs:
 | 
			
		||||
          brew tap homebrew/portable-ruby
 | 
			
		||||
          brew tap homebrew/services
 | 
			
		||||
 | 
			
		||||
          brew update-reset Library/Taps/homebrew/homebrew-bundle
 | 
			
		||||
 | 
			
		||||
          # brew style doesn't like world writable directories
 | 
			
		||||
          sudo chmod -R g-w,o-w "$(brew --repo)/Library/Taps"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
#:  * `update-reset` [<repository> ...]
 | 
			
		||||
#:  * `update-reset` [<path-to-tap-repository> ...]
 | 
			
		||||
#:
 | 
			
		||||
#:  Fetch and reset Homebrew and all tap repositories (or any specified <repository>) using `git`(1) to their latest `origin/HEAD`.
 | 
			
		||||
#:
 | 
			
		||||
@ -33,7 +33,14 @@ homebrew-update-reset() {
 | 
			
		||||
        [[ "${option}" == *d* ]] && HOMEBREW_DEBUG=1
 | 
			
		||||
        ;;
 | 
			
		||||
      *)
 | 
			
		||||
        REPOS+=("${option}")
 | 
			
		||||
        if [[ -d "${option}/.git" ]]
 | 
			
		||||
        then
 | 
			
		||||
          REPOS+=("${option}")
 | 
			
		||||
        else
 | 
			
		||||
          onoe "${option} is not a Git repository!"
 | 
			
		||||
          brew help update-reset
 | 
			
		||||
          exit 1
 | 
			
		||||
        fi
 | 
			
		||||
        ;;
 | 
			
		||||
    esac
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user