Client: substitute -force with --force

This commit is contained in:
Vincent Bernardoff 2018-06-20 16:03:31 +02:00 committed by Benjamin Canou
parent a1a89753e5
commit 4248738866
2 changed files with 6 additions and 6 deletions

View File

@ -147,12 +147,12 @@ module Alias = functor (Entity : Entity) -> struct
end else if n = name && v <> value then begin end else if n = name && v <> value then begin
failwith failwith
"another %s is already aliased as %s, \ "another %s is already aliased as %s, \
use -force to update" use --force to update"
Entity.name n Entity.name n
end else if n <> name && v = value then begin end else if n <> name && v = value then begin
failwith failwith
"this %s is already aliased as %s, \ "this %s is already aliased as %s, \
use -force to insert duplicate" use --force to insert duplicate"
Entity.name n Entity.name n
end else begin end else begin
return () return ()
@ -208,7 +208,7 @@ module Alias = functor (Entity : Entity) -> struct
failwith failwith
"@[<v 2>The %s alias %s already exists.@,\ "@[<v 2>The %s alias %s already exists.@,\
The current value is %s.@,\ The current value is %s.@,\
Use -force to update@]" Use --force to update@]"
Entity.name n Entity.name n
value value
else else

View File

@ -52,7 +52,7 @@ let gen_keys_containing
if name_exists && not force if name_exists && not force
then then
cctxt#warning cctxt#warning
"Key for name '%s' already exists. Use -force to update." name >>= return "Key for name '%s' already exists. Use --force to update." name >>= return
else else
begin begin
cctxt#warning "This process uses a brute force search and \ cctxt#warning "This process uses a brute force search and \
@ -178,7 +178,7 @@ let commands () : Client_context.io_wallet Clic.command list =
fail_unless (pk_uri = pk_uri_found || force) fail_unless (pk_uri = pk_uri_found || force)
(failure (failure
"public and secret keys '%s' don't correspond, \ "public and secret keys '%s' don't correspond, \
please don't use -force" name) please don't use --force" name)
end >>=? fun () -> end >>=? fun () ->
Client_keys.public_key_hash pk_uri >>=? fun (pkh, public_key) -> Client_keys.public_key_hash pk_uri >>=? fun (pkh, public_key) ->
cctxt#message cctxt#message
@ -268,7 +268,7 @@ let commands () : Client_context.io_wallet Clic.command list =
(fixed [ "forget" ; "all" ; "keys" ]) (fixed [ "forget" ; "all" ; "keys" ])
(fun force (cctxt : Client_context.io_wallet) -> (fun force (cctxt : Client_context.io_wallet) ->
fail_unless force fail_unless force
(failure "this can only used with option -force") >>=? fun () -> (failure "this can only used with option --force") >>=? fun () ->
Public_key.set cctxt [] >>=? fun () -> Public_key.set cctxt [] >>=? fun () ->
Secret_key.set cctxt [] >>=? fun () -> Secret_key.set cctxt [] >>=? fun () ->
Public_key_hash.set cctxt []) ; Public_key_hash.set cctxt []) ;