Skip to content

Commit d26bca7

Browse files
author
Oren Cohen
committed
Make sure the script is run from within mbed-os directory
1 parent edcde5e commit d26bca7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/importer/importer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ def get_last_cherry_pick_sha(branch):
176176
args = parser.parse_args()
177177
level = getattr(logging, args.log_level.upper())
178178

179+
if ROOT not in abspath(os.curdir):
180+
parser.error("This script must be run from the mbed-os directory "
181+
"to work correctly.")
182+
179183
# Set logging level
180184
logging.basicConfig(level=level)
181185
rel_log = logging.getLogger("Importer")

0 commit comments

Comments
 (0)