@@ -135,7 +135,7 @@ def server_args(func):
135
135
type = click .Path (exists = True , file_okay = True , dir_okay = False ),
136
136
help = "The path to trusted TLS CA certificates." ,
137
137
)
138
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Print detailed messages ." )
138
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output ." )
139
139
@functools .wraps (func )
140
140
def wrapper (* args , ** kwargs ):
141
141
return func (* args , ** kwargs )
@@ -243,6 +243,7 @@ def wrapper(*args, **kwargs):
243
243
244
244
return wrapper
245
245
246
+
246
247
# This callback handles the "shorthand" --disable-env-management option.
247
248
# If the shorthand flag is provided, then it takes precendence over the R and Python flags.
248
249
# This callback also inverts the --disable-env-management-r and
@@ -399,7 +400,7 @@ def _test_rstudio_creds(server: api.PositServer):
399
400
help = "The path to the file containing the private key used to sign the JWT." ,
400
401
)
401
402
@click .option ("--raw" , "-r" , is_flag = True , help = "Return the API key as raw output rather than a JSON object" )
402
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Enable verbose output" )
403
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output. " )
403
404
@cli_exception_handler
404
405
def bootstrap (
405
406
server ,
@@ -482,11 +483,10 @@ def bootstrap(
482
483
type = click .Path (exists = True , file_okay = True , dir_okay = False ),
483
484
help = "The path to trusted TLS CA certificates." ,
484
485
)
485
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Print detailed messages ." )
486
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output ." )
486
487
@cloud_shinyapps_args
487
488
@click .pass_context
488
489
def add (ctx , name , server , api_key , insecure , cacert , account , token , secret , verbose ):
489
-
490
490
set_verbosity (verbose )
491
491
if click .__version__ >= "8.0.0" and sys .version_info >= (3 , 7 ):
492
492
click .echo ("Detected the following inputs:" )
@@ -550,7 +550,7 @@ def add(ctx, name, server, api_key, insecure, cacert, account, token, secret, ve
550
550
short_help = "List the known Posit Connect servers." ,
551
551
help = "Show the stored information about each known server nickname." ,
552
552
)
553
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Print detailed messages ." )
553
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output ." )
554
554
def list_servers (verbose ):
555
555
set_verbosity (verbose )
556
556
with cli_feedback ("" ):
@@ -630,7 +630,7 @@ def details(name, server, api_key, insecure, cacert, verbose):
630
630
)
631
631
@click .option ("--name" , "-n" , help = "The nickname of the Posit Connect server to remove." )
632
632
@click .option ("--server" , "-s" , help = "The URL of the Posit Connect server to remove." )
633
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Print detailed messages ." )
633
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output ." )
634
634
def remove (name , server , verbose ):
635
635
set_verbosity (verbose )
636
636
@@ -866,7 +866,7 @@ def deploy_notebook(
866
866
python ,
867
867
conda ,
868
868
force_generate ,
869
- verbose : bool ,
869
+ verbose : int ,
870
870
file : str ,
871
871
extra_files ,
872
872
hide_all_input : bool ,
@@ -986,7 +986,7 @@ def deploy_voila(
986
986
env_management_r : bool = None ,
987
987
title : str = None ,
988
988
env_vars : typing .Dict [str , str ] = None ,
989
- verbose : bool = False ,
989
+ verbose : int = 0 ,
990
990
new : bool = False ,
991
991
app_id : str = None ,
992
992
name : str = None ,
@@ -1050,7 +1050,7 @@ def deploy_manifest(
1050
1050
new : bool ,
1051
1051
app_id : str ,
1052
1052
title : str ,
1053
- verbose : bool ,
1053
+ verbose : int ,
1054
1054
file : str ,
1055
1055
env_vars : typing .Dict [str , str ],
1056
1056
visibility : typing .Optional [str ],
@@ -1143,7 +1143,7 @@ def deploy_quarto(
1143
1143
quarto ,
1144
1144
python ,
1145
1145
force_generate : bool ,
1146
- verbose : bool ,
1146
+ verbose : int ,
1147
1147
file_or_directory ,
1148
1148
extra_files ,
1149
1149
env_vars : typing .Dict [str , str ],
@@ -1245,7 +1245,7 @@ def deploy_html(
1245
1245
exclude = None ,
1246
1246
title : str = None ,
1247
1247
env_vars : typing .Dict [str , str ] = None ,
1248
- verbose : bool = False ,
1248
+ verbose : int = 0 ,
1249
1249
new : bool = False ,
1250
1250
app_id : str = None ,
1251
1251
name : str = None ,
@@ -1258,6 +1258,8 @@ def deploy_html(
1258
1258
secret : str = None ,
1259
1259
):
1260
1260
kwargs = locals ()
1261
+ set_verbosity (verbose )
1262
+
1261
1263
ce = None
1262
1264
if connect_server :
1263
1265
kwargs = filter_out_server_info (** kwargs )
@@ -1360,7 +1362,7 @@ def deploy_app(
1360
1362
python ,
1361
1363
conda ,
1362
1364
force_generate : bool ,
1363
- verbose : bool ,
1365
+ verbose : int ,
1364
1366
directory ,
1365
1367
extra_files ,
1366
1368
visibility : typing .Optional [str ],
@@ -1373,6 +1375,7 @@ def deploy_app(
1373
1375
token : str = None ,
1374
1376
secret : str = None ,
1375
1377
):
1378
+ set_verbosity (verbose )
1376
1379
kwargs = locals ()
1377
1380
kwargs ["entrypoint" ] = entrypoint = validate_entry_point (entrypoint , directory )
1378
1381
kwargs ["extra_files" ] = extra_files = validate_extra_files (directory , extra_files )
@@ -2155,7 +2158,7 @@ def remove_content_build(name, server, api_key, insecure, cacert, guid, all, pur
2155
2158
metavar = "TEXT" ,
2156
2159
help = "Check the local build state of a specific content item. This flag can be passed multiple times." ,
2157
2160
)
2158
- @click .option ("--verbose" , "-v" , is_flag = True , help = "Print detailed messages ." )
2161
+ @click .option ("--verbose" , "-v" , count = True , help = "Enable verbose output. Use -vv for very verbose (debug) output ." )
2159
2162
# todo: --format option (json, text)
2160
2163
def list_content_build (name , server , api_key , insecure , cacert , status , guid , verbose ):
2161
2164
set_verbosity (verbose )
0 commit comments