{"action":"opened","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/2553","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/2553/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/2553/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/2553/events","html_url":"https://github.com/espressif/esp-idf/issues/2553","id":369676942,"node_id":"MDU6SXNzdWUzNjk2NzY5NDI=","number":2553,"title":"ESPPORT not being forwarded properly","user":{"login":"sysprogs","id":8538485,"node_id":"MDQ6VXNlcjg1Mzg0ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/8538485?v=4","gravatar_id":"","url":"https://api.github.com/users/sysprogs","html_url":"https://github.com/sysprogs","followers_url":"https://api.github.com/users/sysprogs/followers","following_url":"https://api.github.com/users/sysprogs/following{/other_user}","gists_url":"https://api.github.com/users/sysprogs/gists{/gist_id}","starred_url":"https://api.github.com/users/sysprogs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sysprogs/subscriptions","organizations_url":"https://api.github.com/users/sysprogs/orgs","repos_url":"https://api.github.com/users/sysprogs/repos","events_url":"https://api.github.com/users/sysprogs/events{/privacy}","received_events_url":"https://api.github.com/users/sysprogs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-12T19:13:18Z","updated_at":"2018-10-12T19:13:18Z","closed_at":null,"author_association":"NONE","body":"Currently CMake-based ESP-IDF does not properly handle the ESPPORT environment variable.\r\nIt happens due to the following line in run_esptool.cmake:\r\n\r\n```\r\nif(NOT ENV{ESPPORT})\r\n    message(\"Note: esptool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.\")\r\nelse()\r\n    set(port_arg \"-p $ENV{ESPPORT}\")\r\nendif()\r\n```\r\n\r\nAs something like \"COM1\" is not a valid boolean expression from CMake's point of view, the \"NOT\" branch is taken even if the environment variable is set.\r\n\r\nYou can fix it by using the following check instead:\r\n`if(\"$ENV{ESPPORT}\" STREQUAL \"\")`"}}
{"actor":{"display_login":"sysprogs"}}