Skip auto-detect when UPLOAD_PORT already set via CLI or config
This commit is contained in:
parent
87eefe4a3c
commit
faa4011fd1
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ def query_id(port, timeout=5):
|
||||||
|
|
||||||
|
|
||||||
def detect_port(source, target, env):
|
def detect_port(source, target, env):
|
||||||
|
if env.subst("$UPLOAD_PORT"):
|
||||||
|
print(f" Upload port already set to {env.subst('$UPLOAD_PORT')}, skipping auto-detect")
|
||||||
|
return
|
||||||
|
|
||||||
env_name = env.subst("$PIOENV")
|
env_name = env.subst("$PIOENV")
|
||||||
expected_id = ENV_TO_ID.get(env_name)
|
expected_id = ENV_TO_ID.get(env_name)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue