Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Action error #362

Closed
MatthijsBurgh opened this issue Apr 25, 2022 · 1 comment · Fixed by #363
Closed

GH Action error #362

MatthijsBurgh opened this issue Apr 25, 2022 · 1 comment · Fixed by #363
Labels
bug Something isn't working
Milestone

Comments

@MatthijsBurgh
Copy link
Collaborator

MatthijsBurgh commented Apr 25, 2022

Describe the bug

argument PATH: Error: Path(s) '.' do not exist in 09237df1dd54d667598bf82b432a74f621f3d052

To Reproduce
Just running GH actions with the following options: ``
Which result in the following environment variables:
env:
INPUT_OPTIONS: --check --diff -l 120
INPUT_SRC: .
INPUT_VERSION: 1.5.0
INPUT_REVISION:
INPUT_LINT:
INPUT_COMMIT_RANGE: b2e1bfe99aa6c9e149ba6453a77770547bab4180...09237df1dd54d667598bf82b432a74f621f3d052
pythonioencoding: utf-8

Expected behavior
No error 😉

Screenshots
https://github.com/MatthijsBurgh/epydoc/runs/6154261435?check_suite_focus=true#step:3:90

Environment (please complete the following information):

  • OS: Ubuntu 20.04.4
  • Python version 3.8.10
  • Git version 2.35.1
  • Darker version 1.5.0
  • Black version 22.3.0

Additional context
I think the problem is the INPUT_SRC path. Only indication for that is the matching dot.
update: I have no idea why it says it can't find the dot in the latest commit hash.
update2: Error is comming from

missing = get_missing_at_revision(paths, revrange.rev2, root)
if missing:
missing_reprs = " ".join(repr(str(path)) for path in missing)
rev2_repr = "the working tree" if revrange.rev2 == WORKTREE else revrange.rev2
raise ArgumentError(
Action(["PATH"], "path"),
f"Error: Path(s) {missing_reprs} do not exist in {rev2_repr}",
)

@akaihola akaihola added this to the 1.5.1 milestone Apr 25, 2022
@akaihola
Copy link
Owner

I think we need to handle the repository root specially (i.e. always True):

>>> from pathlib import Path
>>> from darker.git import _git_exists_in_revision
>>> _git_exists_in_revision(Path("."), "HEAD", Path.cwd())
False
>>> _git_exists_in_revision(Path("src"), "HEAD", Path.cwd())
True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants