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

Running with relative path outside of git repo fails #462

Open
allenporter opened this issue Dec 22, 2023 · 0 comments
Open

Running with relative path outside of git repo fails #462

allenporter opened this issue Dec 22, 2023 · 0 comments

Comments

@allenporter
Copy link
Owner

https://github.com/onedr0p/home-ops/actions/runs/7304107954/job/19905782487?pr=6596

Given a rep at /github/workspace/pull/ running the following command from /github/workspace will fail

$ flux-local --log-level DEBUG diff kustomization --unified 6 --path-orig default/kubernetes/main --path pull/kubernetes/main --strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart" --limit-bytes 10000 --all-namespaces --sources "home-kubernetes" --output-file diff.patch
...
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('/github/workspace/pull/pull/kubernetes/main')

This is likely because of the relative path logic here

def relative_path(self) -> Path:
which does not rewrite a relative path to be relative within the git root.

Workarounds are:

  • run from within the repo directory
  • run with absolute paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant