Running with relative path outside of git repo fails
allenporter opened this issue · 0 comments
allenporter commented
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
flux-local/flux_local/git_repo.py
Line 182 in c570d5c
Workarounds are:
- run from within the repo directory
- run with absolute paths