@@ -51,6 +51,13 @@ def __init__(self, *args, **kwargs):
51
51
"Create or transform a manifest. "
52
52
"Use {} [command] -h for help on each command."
53
53
).format (self .parser .prog )
54
+ for initIndex in range (len (self .parser ._subparsers ._actions )):
55
+ try :
56
+ if 'init' in (self .parser ._subparsers ._actions [initIndex ]).choices :
57
+ initParser = self .parser ._subparsers ._actions [initIndex ].choices ['init' ]
58
+ except TypeError :
59
+ pass
60
+ initParser .add_argument ('--no-developer-cert' , help = 'Do not download the developer certificate' )
54
61
55
62
def _addCreateArgs (self , parser , exclusions = []):
56
63
if 'payload' not in exclusions :
@@ -131,10 +138,13 @@ def inner(options):
131
138
"mbed-cli-auto {}" .format (api_key .name ),
132
139
description = "cetificate auto-generated by Mbed CLI"
133
140
)
134
- LOG .info ("Writing developer certificate %s into c file "
141
+ if getattr (options , 'no_developer_cert' ):
142
+ LOG .info ("Skipping download of developer certificate" )
143
+ else :
144
+ LOG .info ("Writing developer certificate %s into c file "
135
145
"mbed_cloud_dev_credentials.c" , dev_cert_info .name )
136
- with open ("mbed_cloud_dev_credentials.c" , "w" ) as fout :
137
- fout .write (dev_cert_info .header_file )
146
+ with open ("mbed_cloud_dev_credentials.c" , "w" ) as fout :
147
+ fout .write (dev_cert_info .header_file )
138
148
return func (options )
139
149
return inner
140
150
0 commit comments