jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
531 stars 230 forks source link

File upload fails with "wrong number of arguments" #1775

Open blackknight36 opened 1 year ago

blackknight36 commented 1 year ago

Describe the bug

This is the same problem reported in #395. When attempting to upload multiple files from a local directory using wildcards I receive an error stating "[🚨Error] Wrong number of arguments (6)." The command used is as follows.

jf rt u anyconnect-linux64-4.*.tar.gz repo-name/anyconnect/

Current behavior

Jfrog upload command fails and returns an error.

Reproduction steps

No response

Expected behavior

No response

JFrog CLI version

jf version 2.22.0

Operating system type and version

MacOS 10.6

JFrog Artifactory version

6.23.41 rev 62341900

JFrog Xray version

No response

blackknight36 commented 1 year ago

Uploading files one by one does appear to work using this command.

for f in anyconnect-linux64-4.*.tar.gz; do jf rt u $f repo-name/anyconnect/; done

The documentation on this needs to be updated to provide clear, working examples.

yahavi commented 1 year ago

Thanks for reporting this issue, @blackknight36. Could you please try to wrap the source pattern with quotes?

jf rt u "anyconnect-linux64-4.*.tar.gz" repo-name/anyconnect/
donatasnicequestion commented 1 year ago

Regarding the question: "Could you please try to wrap the source pattern with quotes?"