You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When running lotus wallet import on a wallet that already exists in the targeted $LOTUS_PATH (importing the same wallet twice). The command exists with an error. This is helpful to remind users that they might have a short memory, but makes automation around importing wallets difficult and error prone because users either need to check that a wallet exists first by listing, or more commonly users will just throw a || true which is bug prone.
Describe the solution you'd like
To avoid breaking the current behaviour, adding a new boolean flag --no-error (default to false) which will cause the command to exit with no error and a status code of 0.
I also wouldn't be terribly opposed to just not returning an error if the address already exists as the outcome is the same as if it was not present.
Note: accepting flag name ideas
Additional context
The command lotus-shed keyinfo import also has this issue (I believe because there was no exported error to check against) so any fix to lotus wallet import should also be ported to lotus-shed keyinfo import.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When running
lotus wallet import
on a wallet that already exists in the targeted$LOTUS_PATH
(importing the same wallet twice). The command exists with an error. This is helpful to remind users that they might have a short memory, but makes automation around importing wallets difficult and error prone because users either need to check that a wallet exists first by listing, or more commonly users will just throw a|| true
which is bug prone.Describe the solution you'd like
To avoid breaking the current behaviour, adding a new boolean flag
--no-error
(default tofalse
) which will cause the command to exit with no error and a status code of0
.I also wouldn't be terribly opposed to just not returning an error if the address already exists as the outcome is the same as if it was not present.
Note: accepting flag name ideas
Additional context
The command
lotus-shed keyinfo import
also has this issue (I believe because there was no exported error to check against) so any fix tolotus wallet import
should also be ported tolotus-shed keyinfo import
.The text was updated successfully, but these errors were encountered: