From 992ffbbef38a2e87d93300c24b80714a5c62fe0e Mon Sep 17 00:00:00 2001
From: Jean-Michel Picod <jmichel@google.com>
Date: Wed, 19 Feb 2020 11:50:52 +0100
Subject: [PATCH] Check for JLinkExe in path

---
 deploy.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/deploy.py b/deploy.py
index d1488d9..5109587 100755
--- a/deploy.py
+++ b/deploy.py
@@ -310,6 +310,11 @@ class OpenSKInstaller(object):
 def main(args):
     # Make sure the current working directory is the right one before running
     os.chdir(os.path.realpath(os.path.dirname(__file__)))
+    # Check for pre-requisite executable files.
+    if not shutil.which("JLinkExe"):
+        fatal(("Couldn't find JLinkExe binary. Make sure Segger JLink tools "
+               "are installed and correctly set up."))
+
     OpenSKInstaller(args).run()
 
 
-- 
GitLab