earthstar-project / earthstar-cli

A complete Earthstar toolbox in the console.
GNU Lesser General Public License v3.0
12 stars 1 forks source link

Trying to set an invalid document does not give useful feedback #23

Open decentral1se opened 1 year ago

decentral1se commented 1 year ago

testing inside denoland/deno:alpine-1.25.4 (https://hub.docker.com/r/denoland/deno/)

earthstar identities generate foob --current
Added @foob to stored identities.
/ # earthstar shares generate foob
Generated share address.
 ? No directory for storing shares has been set yet. Where you would you like it? (/root/Shares) › /root/Shares
Added +foob.kvebxpmd1k0a
'schemaVersion  share~/Shares # earthstar shares set
 ? Choose a share › +foob.kvebxpmd1k0a
 ? Choose a path › foo.txt
 ? Enter document content › barbar
Could not set the document.
invalid_document
sgwilym commented 1 year ago

That's an invalid document as the path must begin with a /. But the CLI should be telling you that. I'll make sure invalid document errors will be properly reported.