kubo/core
Andrew Gillis 6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
..
bootstrap fix(tracing): remove event tracing 2020-01-28 21:31:12 -08:00
commands Improve error message when running key command that locks repo (#7821) 2021-01-28 15:15:49 -05:00
coreapi fix: return an error when an unknown object type is passed 2020-11-30 17:59:37 -08:00
coredag gx: unrewrite 2019-03-05 18:33:56 +01:00
corehttp test: cover 2 remaining lines 2021-01-14 20:53:20 +01:00
corerepo fix(tracing): remove event tracing 2020-01-28 21:31:12 -08:00
coreunix Fix typos and cleanup 2020-04-20 22:00:01 +03:00
mock fix: run tests in "dht server" mode 2020-04-09 23:07:27 -07:00
node Use datastore based pinner 2020-12-04 15:33:31 -05:00
.gitignore ignore testdb 2014-07-05 15:04:04 -07:00
builder.go fix: get rid of shutdown errors 2020-03-29 20:48:43 -07:00
core_test.go quic: remove experimental status and add it to the default config 2020-05-22 04:54:19 +02:00
core.go feat: implement peering service 2020-05-25 20:24:41 -07:00