wily icon indicating copy to clipboard operation
wily copied to clipboard

pre-commit hook is broken in 1.12.2

Open tonybaloney opened this issue 5 years ago • 1 comments

Because of the dynamic cache folders, the pre-commit hook will execute from a different directory and not detect the cache folder of the root path

➜  notations git:(master) ✗ git commit -m "add while test"
wily.....................................................................Failed
hookid: wily

Using default metrics []
Traceback (most recent call last):
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/bin/wily", line 11, in <module>
    sys.exit(cli())
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/wily/__main__.py", line 202, in diff
    config=config, files=files, metrics=metrics, changes_only=not all, detail=detail
  File "/Users/anthonyshaw/.cache/pre-commit/repo9vvhlva6/py_env-python3.6/lib/python3.6/site-packages/wily/commands/diff.py", line 35, in diff
    raise RuntimeError("Missing index, run `wily build`.")
RuntimeError: Missing index, run `wily build`.

tonybaloney avatar May 02 '19 16:05 tonybaloney