Skip to content

Commit edc7e83

Browse files
authored
Merge pull request #397 from bridadan/fix-config-root-error
Allowing root directory configuration
2 parents 708f638 + 32f2c23 commit edc7e83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbed/mbed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,10 +2461,10 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
24612461
else:
24622462
# Find the root of the program
24632463
program = Program(os.getcwd())
2464-
if program.is_cwd:
2464+
if program.is_cwd and not var == 'ROOT':
24652465
error(
24662466
"Could not find mbed program in current path \"%s\".\n"
2467-
"Change the current directory to a valid mbed program or use the '--global' option to set global configuration." % program.path)
2467+
"Change the current directory to a valid mbed program, set the current directory as an mbed program with 'mbed config root .', or use the '--global' option to set global configuration." % program.path)
24682468
with cd(program.path):
24692469
if unset:
24702470
program.set_cfg(var, None)

0 commit comments

Comments
 (0)