E.g.
$ pre-commit try-repo https://github.com/rkm/sample-dotnet-tool
[INFO] Initializing environment for https://github.com/rkm/sample-dotnet-tool.
===============================================================================
Using config:
===============================================================================
repos:
- repo: https://github.com/rkm/sample-dotnet-tool
rev: e53a3601bc06bb038dac30da813572291dd8d58f
hooks:
- id: sample-dotnet-tool
===============================================================================
[INFO] Installing environment for https://github.com/rkm/sample-dotnet-tool.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/rkm/bin/dotnet', 'tool', 'install', '--tool-path', '/tmp/tmp6bk4v26x/repotefhurdg/dotnetenv-default/bin', '--add-source', 'pre-commit-build', 'Rkm')
return code: 1
expected return code: 0
stdout:
/tmp/1873db78-d0a7-48ba-bbff-10a7ef85a2a6/restore.csproj : error NU1101: Unable to find package rkm. No packages exist with this id in source(s): /tmp/tmp6bk4v26x/repotefhurdg/pre-commit-build, nuget.org
stderr:
The tool package could not be restored.
Tool 'rkm' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
Check the log at /home/rkm/.cache/pre-commit/pre-commit.log
search you tried in the issue tracker
dotnet tool
describe your issue
A bit of an oversight when constructing
tool_namehere:pre-commit/pre_commit/languages/dotnet.py
Lines 60 to 63 in cb0bcfd
E.g.
pre-commit --version
pre-commit 2.20.0
.pre-commit-config.yaml
~/.cache/pre-commit/pre-commit.log (if present)
No response