Skip to content

Commit 88f1714

Browse files
Merge pull request #790 from screamerbg/f/location-print
Feature: Don't print location for `mbed config` for easier parsing.
2 parents dd1770f + 69a4dd2 commit 88f1714

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mbed/mbed.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@
144144
# a list of public SCM service (github/butbucket) which support http, https and ssh schemas
145145
public_scm_services = ['bitbucket.org', 'github.com', 'gitlab.com']
146146

147+
# commands that don't get the current work path shown
148+
skip_workpath_commands = ["config", "cfg", "conf"]
147149

148150
# verbose logging
149151
verbose = False
@@ -3375,9 +3377,10 @@ def main():
33753377
very_verbose = pargs.very_verbose
33763378
verbose = very_verbose or pargs.verbose
33773379
pathtype = Repo.pathtype(cwd_root)
3378-
action('Working path \"%s\" (%s)' % (cwd_root, pathtype))
3379-
if pathtype != "program":
3380-
action('Program path \"%s\"' % Program(cwd_root).path)
3380+
if not sys.argv[1].lower() in skip_workpath_commands:
3381+
action('Working path \"%s\" (%s)' % (cwd_root, pathtype))
3382+
if pathtype == "library":
3383+
action('Program path \"%s\"' % Program(cwd_root).path)
33813384
status = pargs.command(pargs)
33823385
except ProcessException as e:
33833386
error(

0 commit comments

Comments
 (0)