qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

qri list breaks if repo has a dataset with no history and no working directory #1060

Closed dustmop closed 4 years ago

dustmop commented 4 years ago

Discovered by @b5. Reproduction steps:

mkdir my_ds
cd my_ds
qri init --name my_ds --format csv
cd ..
rm -rf my_ds
qri list

This ends up with a ref that has no Path and no FSIPath (due to https://github.com/qri-io/qri/pull/1049), which causes repo.PutRef to reject it. qri list does not handle this error properly, bailing out instead of skipping that entry. Ideally, the ref should be removed entirely, since it now refers to nothing at all.

dustmop commented 4 years ago

Fixed by https://github.com/qri-io/qri/pull/1062.