@@ -103,7 +103,7 @@ def toggle(plugin: str):
103
103
@click .argument ("plugin_name" , type = str , default = "" )
104
104
@click .argument ("function_name" , type = str , default = "" )
105
105
@click .option (
106
- "--params" , type = str , default = "" , help = "Paramter data to be fed to the plugin function"
106
+ "--params" , type = str , default = "" , help = "Parameter data to be fed to the plugin function"
107
107
)
108
108
def run (plugin_name : str , function_name : str , params : str ):
109
109
"""Explore and run plugins
@@ -206,7 +206,7 @@ def run(plugin_name: str, function_name: str, params: str):
206
206
)
207
207
else :
208
208
click .secho (
209
- f"\n warnet plugin run { plugin_name } { function_name } --json-input '{ json .dumps (params )} '" ,
209
+ f"\n warnet plugin run { plugin_name } { function_name } --params '{ json .dumps (params )} '" ,
210
210
fg = "green" ,
211
211
)
212
212
else :
@@ -221,17 +221,15 @@ def execute_function_with_params(func: Callable[..., Any], params: dict | list):
221
221
try :
222
222
return_value = func (** params )
223
223
if return_value is not None :
224
- jsonified = json .dumps (return_value )
225
- print (f"'{ jsonified } '" )
224
+ print (json .dumps (return_value ))
226
225
except Exception as e :
227
226
click .secho (f"Exception: { e } " , fg = "yellow" )
228
227
sys .exit (1 )
229
228
case list ():
230
229
try :
231
230
return_value = func (* params )
232
231
if return_value is not None :
233
- jsonified = json .dumps (return_value )
234
- print (f"'{ jsonified } '" )
232
+ print (json .dumps (return_value ))
235
233
except Exception as e :
236
234
click .secho (f"Exception: { e } " , fg = "yellow" )
237
235
sys .exit (1 )
0 commit comments