Skip to content

Commit 32f2c23

Browse files
committed
Allowing root directory configuration to happen in an unknown project directory
1 parent e25da20 commit 32f2c23

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
@@ -2434,10 +2434,10 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
24342434
else:
24352435
# Find the root of the program
24362436
program = Program(os.getcwd())
2437-
if program.is_cwd:
2437+
if program.is_cwd and not var == 'ROOT':
24382438
error(
24392439
"Could not find mbed program in current path \"%s\".\n"
2440-
"Change the current directory to a valid mbed program or use the '--global' option to set global configuration." % program.path)
2440+
"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)
24412441
with cd(program.path):
24422442
if unset:
24432443
program.set_cfg(var, None)

0 commit comments

Comments
 (0)