forked from platformio/platformio-core
Check context arguments before comparison // Resolve #1000
This commit is contained in:
@ -39,7 +39,7 @@ def in_silence(ctx=None):
|
|||||||
assert ctx
|
assert ctx
|
||||||
ctx_args = ctx.args or []
|
ctx_args = ctx.args or []
|
||||||
conditions = [
|
conditions = [
|
||||||
ctx.args[0] == "upgrade", "--json-output" in ctx_args,
|
ctx_args and ctx.args[0] == "upgrade", "--json-output" in ctx_args,
|
||||||
"--version" in ctx_args
|
"--version" in ctx_args
|
||||||
]
|
]
|
||||||
return ctx_args and any(conditions)
|
return ctx_args and any(conditions)
|
||||||
|
Reference in New Issue
Block a user