eXist-db / xst

Command line tool to interact with exist-db instances
https://npmjs.com/@existdb/xst
MIT License
17 stars 4 forks source link

xst upload with globs, expanded by the shell, must fail with an actionable error #105

Closed windauer closed 11 months ago

windauer commented 1 year ago

What happened?

xst up data/* /db/apps/my-app/data/ --config .xstrc only uploads the first file in the local data directory and not like expected all files.

System Information

Build: eXist-6.2.0 (c8fa4958b6d4a50bd0cba7f3e76a150226414187)
Java: 11.0.18 (Eclipse Adoptium)
OS: Linux 5.15.0-69-generic (amd64)

Relevant shell output

xst up data/* /db/apps/eebo-data/data --config .xstrc
line-o commented 1 year ago

Unfortunately shells (sh, zsh, fish, ...) expand the glob * before xst gets to see it. That means xst parses

xst up data/first.file data/second.file ... /db/apps/eebo-data/data --config .xstrc

which will not do what you expect it to do. I assume it will even try to upload data/first.file to data/second.file and either create a new collection with second.file or fail.

line-o commented 1 year ago

This has to fail immediately with an actionable error message.

windauer commented 1 year ago

xst did state uploaded data/<firstfile.xml> in 435ms but indeed the file did not make it onto the server but there was no error message.

github-actions[bot] commented 11 months ago

:tada: This issue has been resolved in version 1.7.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: