Skip to content
New issue

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

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

Already on GitHub? # to your account

import command is blocking, but not clear about the why #52

Open
mokasin opened this issue May 17, 2020 · 4 comments
Open

import command is blocking, but not clear about the why #52

mokasin opened this issue May 17, 2020 · 4 comments

Comments

@mokasin
Copy link
Contributor

mokasin commented May 17, 2020

Describe the bug
When importing a directory the command blocks and does not return to the shell. It is unclear, why it does that. Apparently, it lurks around to see if something changes in that directory.

To Reproduce

# hyperdrive import /tmp/foobar
Importing /tmp/foobar into <key> (Ctrl+c to exit)...

Importing | ======================================== | 100% | 1/1 Files

Expected Behavior
Either return or better explain what it is doing. Like

File/Folder successfully imported. Watching for further changes (Ctrl +c to stop)...

** OS **
Arch Linux

** Node version **
13.0.1

** Was the daemon installed from NPM or bundled with Beaker? **
NPM

@mokasin
Copy link
Contributor Author

mokasin commented May 17, 2020

Also: When pressing Ctrl+c it tells me

Exit signal received. Stopping upload...

Which does not make perfectly clear (to me) that the files are still seeded and accessible.

@andrewosh
Copy link
Member

Hey @mokasin, yeah perhaps the import command shouldn't watch by default -- it currently does. I'll add a more descriptive message. Thanks!

@da2x
Copy link
Contributor

da2x commented Jun 6, 2020

I also want an import command that doesn’t stick around. Suggestions:

  • change the default and require --watch to stick around,
  • or keep the default and add a --exit or --oneshot argument to exit after importing everything.

@andrewosh
Copy link
Member

Yeah @da2x I think I'm just gonna make import not watch by default, as --watch is pretty standard. I'll get this into the next release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants