Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
windauer opened this issue Mar 30, 2023 · 4 comments · Fixed by #144
Closed

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

windauer opened this issue Mar 30, 2023 · 4 comments · Fixed by #144
Assignees
Labels
bug Something isn't working released

Comments

@windauer
Copy link
Member

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
@windauer windauer added the bug Something isn't working label Mar 30, 2023
@line-o
Copy link
Member

line-o commented Mar 30, 2023

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
Copy link
Member

line-o commented Mar 30, 2023

This has to fail immediately with an actionable error message.

@windauer
Copy link
Member Author

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.

@line-o line-o changed the title xst up data/* /db/apps/my-app/data/ --config .xstrc does not upload all files in data xst upload with globs, expanded by the shell, must fail with an actionable error Oct 6, 2023
line-o added a commit to line-o/xst that referenced this issue Oct 8, 2023
fixes eXist-db#105

When a glob character is used in the source argument _and_ it matches
more than one file or folder no action will be performed and an
actionable error message is displayed instead.
line-o added a commit to line-o/xst that referenced this issue Oct 8, 2023
fixes eXist-db#105

When a glob character is used in the source argument _and_ it matches
more than one file or folder no action will be performed and an
actionable error message is displayed instead.
line-o added a commit that referenced this issue Oct 12, 2023
fixes #105

When a glob character is used in the source argument _and_ it matches
more than one file or folder no action will be performed and an
actionable error message is displayed instead.
@github-actions
Copy link

🎉 This issue has been resolved in version 1.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants