Skip to content

Commit 600cae6

Browse files
yangbolu1991kartben
authored andcommitted
scripts: blobs: add auto-accept option for license click-through
Added auto-accept option for license click-through. Signed-off-by: Yangbo Lu <[email protected]>
1 parent e1b5b8b commit 600cae6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/west_commands/blobs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def do_add_parser(self, parser_adder):
7777
help='''format string to use to list each blob;
7878
see FORMAT STRINGS below''')
7979

80+
group = parser.add_argument_group('west blobs fetch options')
81+
group.add_argument('-a', '--auto-accept', action='store_true',
82+
help='''auto accept license if the fetching needs click-through''')
83+
8084
return parser
8185

8286
def get_blobs(self, args):
@@ -154,7 +158,7 @@ def fetch(self, args):
154158
continue
155159
self.inf('Fetching blob {module}: {abspath}'.format(**blob))
156160

157-
if blob['click-through']:
161+
if blob['click-through'] and not args.auto_accept:
158162
while True:
159163
user_input = input("For this blob, need to read and accept "
160164
"license to continue. Read it?\n"

0 commit comments

Comments
 (0)