From 32f2c236cec805d80fb3a3b5a12cb0258a1276f0 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Mon, 21 Nov 2016 15:46:25 -0600 Subject: [PATCH] Allowing root directory configuration to happen in an unknown project directory --- mbed/mbed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mbed/mbed.py b/mbed/mbed.py index 157fbb33..61f55f96 100644 --- a/mbed/mbed.py +++ b/mbed/mbed.py @@ -2434,10 +2434,10 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal else: # Find the root of the program program = Program(os.getcwd()) - if program.is_cwd: + if program.is_cwd and not var == 'ROOT': error( "Could not find mbed program in current path \"%s\".\n" - "Change the current directory to a valid mbed program or use the '--global' option to set global configuration." % program.path) + "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) with cd(program.path): if unset: program.set_cfg(var, None)