hyperdrive-daemon
hyperdrive-daemon copied to clipboard
`import` command is blocking, but not clear about the why
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
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.
Hey @mokasin, yeah perhaps the import command shouldn't watch by default -- it currently does. I'll add a more descriptive message. Thanks!
I also want an import command that doesn’t stick around. Suggestions:
- change the default and require
--watchto stick around, - or keep the default and add a
--exitor--oneshotargument to exit after importing everything.
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.