termoshtt / ocipkg

An OCI registry client for Rust desiged to use distribute static library as a "container"
Apache License 2.0
48 stars 8 forks source link

Ignore docker and podman auth info if deserialization failed #75

Closed termoshtt closed 2 years ago

termoshtt commented 2 years ago

Problem

For example, $HOME/.docker/config.json on Windows runner of GitHub Actions is following:

{
    "auths": {
        "https://index.docker.io/v1/": {}
    },
    "credsStore": "wincred"
}

Current implementation of ocipkg will fail if this config.json exists with

Error: InvalidJson(Error("missing field `auth`", line: 3, column: 35))

https://github.com/rust-math/rust-mkl-container/actions/runs/3038006115/jobs/4891157780

How to fix

This PR simply ignores such config.json which cause deserialization error.