mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2026-02-03 01:45:08 +01:00
chore(*): update command error type
Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
parent
a4d4c459ba
commit
1c73b92f0f
5 changed files with 9 additions and 9 deletions
|
|
@ -34,13 +34,13 @@ func GetGitLatestCommitId(ctx context.Context, log logger.Logger, repo string) (
|
|||
}, nil)
|
||||
if err != nil {
|
||||
return "", &ErrGitList{
|
||||
ErrCommandExec: err,
|
||||
ErrCommandExec: err.(*command.ErrCommandExec),
|
||||
}
|
||||
}
|
||||
f := strings.Fields(string(data))
|
||||
if len(f) != 2 {
|
||||
return "", &ErrGitList{
|
||||
ErrCommandExec: err,
|
||||
ErrCommandExec: err.(*command.ErrCommandExec),
|
||||
}
|
||||
}
|
||||
return f[0], nil
|
||||
|
|
@ -53,7 +53,7 @@ func ListGitCommitIds(ctx context.Context, log logger.Logger, repo string) ([]st
|
|||
}, nil)
|
||||
if err != nil {
|
||||
return nil, &ErrGitList{
|
||||
ErrCommandExec: err,
|
||||
ErrCommandExec: err.(*command.ErrCommandExec),
|
||||
}
|
||||
}
|
||||
var commitIds []string
|
||||
|
|
@ -74,7 +74,7 @@ func ListGitTags(ctx context.Context, log logger.Logger, repo string) ([]string,
|
|||
}, nil)
|
||||
if err != nil {
|
||||
return nil, &ErrGitList{
|
||||
ErrCommandExec: err,
|
||||
ErrCommandExec: err.(*command.ErrCommandExec),
|
||||
}
|
||||
}
|
||||
var tags []string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue