forked from platformio/platformio-core
Fixed an issue when "debug", "home", "run", and "test" commands were not shown in "platformio --help" CLI
This commit is contained in:
@ -14,6 +14,7 @@ PlatformIO 4.0
|
||||
* Improved computing of project check sum (structure, configuration) and avoid unnecessary rebuilding
|
||||
* Renamed "enable_ssl" setting to `strict_ssl <http://docs.platformio.org/page/userguide/cmd_settings.html#strict-ssl>`__
|
||||
* Fixed an issue with incorrect escaping of Windows slashes when using `PIO Unified Debugger <http://docs.platformio.org/page/plus/debugging.html>`__ and "piped" openOCD
|
||||
* Fixed an issue when "debug", "home", "run", and "test" commands were not shown in "platformio --help" CLI
|
||||
|
||||
4.0.0 (2019-07-10)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
from os.path import dirname
|
||||
from os.path import dirname, isfile, join
|
||||
|
||||
import click
|
||||
|
||||
@ -38,11 +38,14 @@ class PlatformioCLI(click.MultiCommand):
|
||||
|
||||
def list_commands(self, ctx):
|
||||
cmds = []
|
||||
for filename in os.listdir(dirname(__file__)):
|
||||
if filename.startswith("__init__"):
|
||||
cmds_dir = dirname(__file__)
|
||||
for name in os.listdir(cmds_dir):
|
||||
if name.startswith("__init__"):
|
||||
continue
|
||||
if filename.endswith(".py"):
|
||||
cmds.append(filename[:-3])
|
||||
if isfile(join(cmds_dir, name, "command.py")):
|
||||
cmds.append(name)
|
||||
elif name.endswith(".py"):
|
||||
cmds.append(name[:-3])
|
||||
cmds.sort()
|
||||
return cmds
|
||||
|
||||
|
Reference in New Issue
Block a user