chore: use new style octal (#1630)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Jason Song
2023-02-16 23:34:51 +08:00
committed by GitHub
parent b0a5068f6d
commit 1316307313
12 changed files with 35 additions and 30 deletions

View File

@@ -11,8 +11,6 @@ import (
"strings"
"sync"
"github.com/nektos/act/pkg/common"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
@@ -20,6 +18,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/mattn/go-isatty"
log "github.com/sirupsen/logrus"
"github.com/nektos/act/pkg/common"
)
var (
@@ -260,7 +260,7 @@ func CloneIfRequired(ctx context.Context, refName plumbing.ReferenceName, input
return nil, err
}
if err = os.Chmod(input.Dir, 0755); err != nil {
if err = os.Chmod(input.Dir, 0o755); err != nil {
return nil, err
}
}

View File

@@ -167,7 +167,7 @@ func TestGitFindRef(t *testing.T) {
name := name
t.Run(name, func(t *testing.T) {
dir := filepath.Join(basedir, name)
require.NoError(t, os.MkdirAll(dir, 0755))
require.NoError(t, os.MkdirAll(dir, 0o755))
require.NoError(t, gitCmd("-C", dir, "init", "--initial-branch=master"))
require.NoError(t, cleanGitHooks(dir))
tt.Prepare(t, dir)