hyperdrive-daemon icon indicating copy to clipboard operation
hyperdrive-daemon copied to clipboard

`import` command is blocking, but not clear about the why

Open mokasin opened this issue 5 years ago • 4 comments

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 avatar May 17 '20 15:05 mokasin

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.

mokasin avatar May 17 '20 15:05 mokasin

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

andrewosh avatar May 29 '20 09:05 andrewosh

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.

da2x avatar Jun 06 '20 18:06 da2x

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.

andrewosh avatar Jun 06 '20 18:06 andrewosh