1
0
Fork 0
forked from forgejo/forgejo

Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)

This commit is contained in:
6543 2022-02-06 20:01:47 +01:00 committed by GitHub
parent 8ae5e6d7fd
commit 3043eb36bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 258 additions and 263 deletions

View file

@ -74,7 +74,7 @@ func (repo *Repository) CheckAttribute(opts CheckAttributeOpts) (map[string]map[
}
}
cmd := NewCommandContext(repo.Ctx, cmdArgs...)
cmd := NewCommand(repo.Ctx, cmdArgs...)
if err := cmd.RunInDirTimeoutEnvPipeline(env, -1, repo.Path, stdOut, stdErr); err != nil {
return nil, fmt.Errorf("failed to run check-attr: %v\n%s\n%s", err, stdOut.String(), stdErr.String())
@ -152,7 +152,7 @@ func (c *CheckAttributeReader) Init(ctx context.Context) error {
cmdArgs = append(cmdArgs, "--")
c.ctx, c.cancel = context.WithCancel(ctx)
c.cmd = NewCommandContext(c.ctx, cmdArgs...)
c.cmd = NewCommand(c.ctx, cmdArgs...)
var err error