@@ -33,7 +33,7 @@ def _exec_log(execution: JobExecution, msg: str, level: int = 3):
33
33
)
34
34
35
35
36
- def _commandline_arguments (job : Job , execution : JobExecution , creds : BaseJobCredentials ) -> str :
36
+ def _commandline_arguments (job : Job , execution : JobExecution , creds : ( BaseJobCredentials , None ) ) -> str :
37
37
cmd_arguments = []
38
38
if is_set (job .cmd_args ):
39
39
cmd_arguments .append (job .cmd_args )
@@ -57,20 +57,21 @@ def _commandline_arguments(job: Job, execution: JobExecution, creds: BaseJobCred
57
57
else :
58
58
_exec_log (execution = execution , msg = 'Ignoring known_hosts file because it does not exist' , level = 5 )
59
59
60
- if is_set (creds .become_pass ):
61
- cmd_arguments .append ('--ask-become-pass' )
60
+ if is_set (creds ):
61
+ if is_set (creds .become_pass ):
62
+ cmd_arguments .append ('--ask-become-pass' )
62
63
63
- if is_set (creds .become_user ):
64
- cmd_arguments .append (f'--become-user { creds .become_user } ' )
64
+ if is_set (creds .become_user ):
65
+ cmd_arguments .append (f'--become-user { creds .become_user } ' )
65
66
66
- if is_set (creds .connect_pass ):
67
- cmd_arguments .append ('--ask-pass' )
67
+ if is_set (creds .connect_pass ):
68
+ cmd_arguments .append ('--ask-pass' )
68
69
69
- if is_set (creds .connect_user ):
70
- cmd_arguments .append (f'--user { creds .connect_user } ' )
70
+ if is_set (creds .connect_user ):
71
+ cmd_arguments .append (f'--user { creds .connect_user } ' )
71
72
72
- if is_set (creds .vault_pass ):
73
- cmd_arguments .append ('--ask-vault-pass' )
73
+ if is_set (creds .vault_pass ):
74
+ cmd_arguments .append ('--ask-vault-pass' )
74
75
75
76
return ' ' .join (cmd_arguments )
76
77
@@ -129,7 +130,7 @@ def _execution_or_job(job: Job, execution: JobExecution, attr: str):
129
130
130
131
131
132
def _runner_options (
132
- job : Job , execution : JobExecution , path_run : Path , project_dir : str , creds : BaseJobCredentials ,
133
+ job : Job , execution : JobExecution , path_run : Path , project_dir : str , creds : ( BaseJobCredentials , None ) ,
133
134
) -> dict :
134
135
verbosity = None
135
136
if execution .verbosity != 0 :
0 commit comments