1

下面的引文是为 brew-cask 做出贡献的说明。但是,我无法理解这句话:github_user='<my-github-username>',我不知道我是否应该输入<>,以及什么是github_user

一个 GitHub 帐户有一个电子邮件地址和两个名称。更重要的是,当我输入最后一句时:cask-repair --pull origin --push $github_user $outdated_cask. 有 2 个错误:the requested upstream branch 'Andy1984' does not exist

Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "head"

结果是There was an error submitting the pull request. Have you forked the repo and made sure the pull and push remotes exist?我很确定我遵循了说明。怎么了?

# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help

# fork homebrew-cask to your account - only needed once
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"
hub fork

# use to update <outdated_cask>
outdated_cask='<the-cask-i-want-to-update>'
github_user='<my-github-username>'
cd "$(brew --repository)/Library/Taps/caskroom/homebrew-cask/Casks"

cask-repair --pull origin --push $github_user $outdated_cask
4

1 回答 1

2

根据文档,您还可以使用脚本来推送现有木桶的新版本。

检查:https ://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask

# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help

# use to update <outdated_cask>
cask-repair <outdated_cask>
于 2017-04-22T06:41:34.500 回答