Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release change failed if metadata.json not exists #93

Merged

Conversation

AlkaidChan
Copy link
Collaborator

解决 metadata.json 文件不存在时应该继续变更而不是报错的问题

} else if lastMetadata.ReleaseID == r.ReleaseID {
}
// 如果 metadata 文件不存在,说明没有执行过 pull 操作
if !exist {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 这里直接使用error判断是否就可以, 不需要单独翻译一个exist.
  • 不存在是很正常的行为, 感觉不需要打印或者debug就好

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提供 Unwrap 接口, 上层可以通过Error判断最近, 可后面优化

@ifooth ifooth merged commit 94cea1a into TencentBlueKing:master Apr 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants