A2-ai / devious

Large/sensitive file linker for Git repositories
MIT License
5 stars 0 forks source link

JSON output contains non-JSON output #32

Closed dpastoor closed 1 year ago

dpastoor commented 1 year ago
Devins-MacBook-Pro:foo devin$ dvs get /Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv --json
    Writing file... 100% |██████████████████████████████| (506/506 MB, 1.9 GB/s)        
{
    "actions": [
        {
            "action": "wrote file",
            "path": "/Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv"
        }
    ],
    "issues": null
}
dpastoor commented 1 year ago

same issue for add

Devins-MacBook-Pro:foo devin$ dvs add /Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv --json
    Writing file... 100% |███████████████████████████████████████████████| (506/506 MB, 1.6 GB/s)        
{
    "actions": [
        {
            "action": "generated hash",
            "path": "/Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv"
        },
        {
            "action": "wrote file",
            "path": "/Users/devin/repos/a2-ai/test-dvs/data/test1/28862263e14054b1490ba389ead7683fae204dda5a42d8339304ebf16db94a94.dvsfile"
        },
        {
            "action": "copied file",
            "path": "/Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv"
        },
        {
            "action": "added gitignore entry",
            "path": "/Users/devin/repos/a2-ai/test-dvs/test1/test_data.csv"
        }
    ],
    "issues": null
}
andriygm commented 1 year ago

Will add regression tests for JSON including ensuring output of every command is parsed as valid JSON.