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

Error: failed to load input files while checking git diff #241

Open
yeahdongcn opened this issue Aug 22, 2022 · 1 comment
Open

Error: failed to load input files while checking git diff #241

yeahdongcn opened this issue Aug 22, 2022 · 1 comment

Comments

@yeahdongcn
Copy link

I follow the instructions to install dyff through homebrew and config it to git.

brew install homeport/tap/dyff

git config --local diff.dyff.command 'dyff_between() { dyff --color on between --omit-header "$2" "$5"; }; dyff_between'
echo '*.yml diff=dyff' >> .gitattributes
echo '*.yaml diff=dyff' >> .gitattributes

But when I try to view the diff, dyff shows the following error.

git log --ext-diff -u
Date:   Mon Aug 22 09:10:40 2022 +0800

    Use dyff to restructure the dry run result
    
    Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>

diff --git a/Makefile b/Makefile
index 8b3491d..403161d 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,7 @@ go-test:
 0200: build
        bin/kustohelmize create --from=test/testdata/0200_sample.yaml test/output/0200/mychart
        helm install --dry-run xyz test/output/0200/mychart > test/output/0200/mychart.yaml
+       dyff yaml -i --restructure test/output/0200/mychart.yaml
 
 ##@ Tools
 

LAST DEPLOYED  (document #1)
  ± value change
    - Mon Aug 22 08:56:48 2022
    + Mon Aug 22 09:09:58 2022

╭ Error: failed to load input files
│ unable to parse data from
│ /var/folders/p9/dbq3q88x7c39y7tmwqgj6yjr0000gn/T//HsEOwh_xyz-yourchart-deployment.yaml:
│ yaml: line 6: did not find expected node content
╵
fatal: external diff died, stopping at test/output/0200/mychart/templates/xyz-yourchart-deployment.yaml

BTW, dyff yaml -i --restructure test/output/0200/mychart.yaml doesn't work either. mychart.yaml can be found at https://github.com/yeahdongcn/kustohelmize/blob/main/test/output/0200/mychart.yaml

@yeahdongcn
Copy link
Author

From the error message, it seems there is something wrong when retrieving an intermediate file from the temp directory on macOS.

/var/folders/p9/dbq3q88x7c39y7tmwqgj6yjr0000gn/T//HsEOwh_xyz-yourchart-deployment.yaml:

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