Client: use TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y to disable the banner

This commit is contained in:
Benjamin Canou 2018-06-29 17:00:04 +02:00
parent 797b26c16c
commit e1195e6f3e
2 changed files with 71 additions and 61 deletions

View File

@ -9,7 +9,15 @@
open Client_config
let disable_disclaimer =
match Sys.getenv_opt "TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER" with
| Some ("yes" | "y" | "YES" | "Y") -> true
| _ -> false
let display_warning_banner ctxt =
if disable_disclaimer then
Lwt.return ()
else
let default () =
Format.eprintf
"@[<v 2>@{<warning>@{<title>Warning@}@}@,@,\

View File

@ -7,6 +7,8 @@ cd "$test_dir"
sandbox_file="$test_dir/sandbox.json"
parameters_file="$test_dir/protocol_parameters.json"
export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y
tezos_sandboxed_node="${1:-$test_dir/../../bin_node/tezos-sandboxed-node.sh}"
local_node="${2:-$test_dir/../../../_build/default/src/bin_node/main.exe}"
tezos_init_sandboxed_client="${3:-$test_dir/../../bin_client/tezos-init-sandboxed-client.sh}"