You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ pre-commit try-repo . shfmt --verbose --all-files
[WARNING] Creating temporary repo with uncommitted changes...
===============================================================================
Using config:
===============================================================================
repos:
- repo: /tmp/tmpkb89hypm/shadow-repo
rev: 6c8fe49ebeca4fee22e23f9ee140e04a89805376
hooks:
- id: shfmt
===============================================================================
[INFO] Initializing environment for /tmp/tmpkb89hypm/shadow-repo.
[INFO] Initializing environment for /tmp/tmpkb89hypm/shadow-repo:github.com/mvdan/sh/cmd/shfmt.
[INFO] Installing environment for /tmp/tmpkb89hypm/shadow-repo.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/go/bin/go', 'get', './...')
return code: 1
expected return code: 0
stdout: (none)
stderr:
go: cannot find main module, but found .git/config in /tmp/tmpkb89hypm/repoxoqgjt0m/golangenv-default/src/unknown_src_dir
to create a module there, run:
go mod init
Check the log at /home/derek/.cache/pre-commit/pre-commit.log
No idea what that means. Any help please?
The text was updated successfully, but these errors were encountered:
Hi, I don't have any experience with go, but would like to expose
shfmt
as a hook. If I define in.pre-commit-hooks.yaml
:which is my attempt at mimicking #1785, I get:
No idea what that means. Any help please?
The text was updated successfully, but these errors were encountered: