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

Handle case where someone might try to retrieve a file two times #71

Closed
natewalck opened this issue May 5, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@natewalck
Copy link
Collaborator

Here is what happens if you try to retrieve the same file two times in a row:

$PANTRI_BIN --vv retrieve "/Users/nw/some_git_project/Nudge-1.1.11.81465.pkg.pfile"
INFO : 2023/05/05 12:10:40.454345 logger.go:344: Info verbosity set to 2
INFO : Downloading files from: http://127.0.0.1:9000/test
INFO : Downloading file: [/Users/nw/some_git_project/Nudge-1.1.11.81465.pkg.pfile]


$PANTRI_BIN --vv retrieve "/Users/nw/some_git_project/Nudge-1.1.11.81465.pkg.pfile"
INFO : 2023/05/05 12:10:47.168526 logger.go:344: Info verbosity set to 2
INFO : Downloading files from: http://127.0.0.1:9000/test
INFO : Downloading file: [/Users/nw/some_git_project/Nudge-1.1.11.81465.pkg.pfile]
INFO : /Users/nw/some_git_project/Nudge-1.1.11.81465.pkg already exists
Error: invalid argument
Usage:
   retrieve [flags]

Flags:
  -h, --help   help for retrieve

Global Flags:
      --debug   Run in debug mode
      --vv      Run in verbose logging mode

2023/05/05 12:10:47 invalid argument

Instead of "Error: Invalid argument" it should give the already exists message.

@natewalck natewalck added the bug Something isn't working label May 5, 2023
@natewalck
Copy link
Collaborator Author

Fixed in #90

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

No branches or pull requests

2 participants