Title: recursive submodule support for `language: golang` · Issue #1788 · pre-commit/pre-commit · GitHub
Open Graph Title: recursive submodule support for `language: golang` · Issue #1788 · pre-commit/pre-commit
X Title: recursive submodule support for `language: golang` · Issue #1788 · pre-commit/pre-commit
Description: I added this hook in pre-commit-hooks.yaml in https://github.com/google/go-jsonnet, and then when I try to use this hook as: repos: - repo: https://github.com/google/go-jsonnet rev: 4a3144a417b7eb9b1f7e56741a9e72f3155de3fa hooks: - id: j...
Open Graph Description: I added this hook in pre-commit-hooks.yaml in https://github.com/google/go-jsonnet, and then when I try to use this hook as: repos: - repo: https://github.com/google/go-jsonnet rev: 4a3144a417b7eb9...
X Description: I added this hook in pre-commit-hooks.yaml in https://github.com/google/go-jsonnet, and then when I try to use this hook as: repos: - repo: https://github.com/google/go-jsonnet rev: 4a3144a417b7eb9...
Opengraph URL: https://github.com/pre-commit/pre-commit/issues/1788
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"recursive submodule support for `language: golang`","articleBody":"I added this hook in `pre-commit-hooks.yaml` in `https://github.com/google/go-jsonnet`, and then when I try to use this hook as:\r\n```\r\nrepos:\r\n - repo: https://github.com/google/go-jsonnet\r\n rev: 4a3144a417b7eb9b1f7e56741a9e72f3155de3fa\r\n hooks:\r\n - id: jsonnet-format\r\n```\r\nthen I see following error.\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/error_handler.py\", line 65, in error_handler\r\n yield\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/main.py\", line 378, in main\r\n return run(args.config, store, args)\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/commands/run.py\", line 403, in run\r\n install_hook_envs(hooks, store)\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/repository.py\", line 224, in install_hook_envs\r\n _hook_install(hook)\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/repository.py\", line 82, in _hook_install\r\n lang.install_environment(\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/languages/golang.py\", line 81, in install_environment\r\n cmd_output_b('go', 'get', './...', cwd=repo_src_dir, env=env)\r\n File \"/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/util.py\", line 154, in cmd_output_b\r\n raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)\r\npre_commit.util.CalledProcessError: command: ('/usr/local/bin/go', 'get', './...')\r\nreturn code: 2\r\nexpected return code: 0\r\nstdout: (none)\r\nstderr:\r\n go: downloading github.com/sergi/go-diff v1.1.0\r\n go: downloading github.com/fatih/color v1.9.0\r\n go: downloading github.com/mattn/go-colorable v0.1.4\r\n go: downloading github.com/mattn/go-isatty v0.0.11\r\n go: downloading golang.org/x/sys v0.0.0-20191026070338-33540a1f6037\r\n # github.com/google/go-jsonnet/c-bindings\r\n libjsonnet.cpp:5:14: fatal error: 'libjsonnet.h' file not found\r\n\r\n```\r\nAny idea? Thanks.\r\n\r\n_Originally posted by @gaurav517 in https://github.com/pre-commit/pre-commit/issues/1785#issuecomment-774486062_","author":{"url":"https://github.com/asottile","@type":"Person","name":"asottile"},"datePublished":"2021-02-06T17:41:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1788/pre-commit/issues/1788"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:55d0e8f3-cd0d-259e-6260-02b7343dfcbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8CE:33585E:714929:A458F6:6A55EA9C |
| html-safe-nonce | 4c3859dda3bb64f6b40c0ad8137b81b44f31b4dab2f88f8f050b58df49b385d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOENFOjMzNTg1RTo3MTQ5Mjk6QTQ1OEY2OjZBNTVFQTlDIiwidmlzaXRvcl9pZCI6IjM4NTc4NjYyMjEyMTIyNjUxMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ca656d7026e1ebdef87c72b468c0a9914470dc74f960a40fdfcb10d80002e6f3 |
| hovercard-subject-tag | issue:802750692 |
| github-keyboard-shortcuts | repository,issues,commits,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit/1788/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba62da3f287371f6a7b0aa9d6439ed05ab2d7ed3c68c06624633c99cce5c08be/pre-commit/pre-commit/issues/1788 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba62da3f287371f6a7b0aa9d6439ed05ab2d7ed3c68c06624633c99cce5c08be/pre-commit/pre-commit/issues/1788 |
| og:image:alt | I added this hook in pre-commit-hooks.yaml in https://github.com/google/go-jsonnet, and then when I try to use this hook as: repos: - repo: https://github.com/google/go-jsonnet rev: 4a3144a417b7eb9... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | asottile |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git |
| octolytics-dimension-user_id | 6943086 |
| octolytics-dimension-user_login | pre-commit |
| octolytics-dimension-repository_id | 17689377 |
| octolytics-dimension-repository_nwo | pre-commit/pre-commit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17689377 |
| octolytics-dimension-repository_network_root_nwo | pre-commit/pre-commit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3725c7f9b2a6e3a27ef57c5aed13428c0f65e045 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width