summaryrefslogtreecommitdiffstats
path: root/tests/site_scons/site_tools/nanopb.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/site_scons/site_tools/nanopb.py')
-rw-r--r--tests/site_scons/site_tools/nanopb.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/site_scons/site_tools/nanopb.py b/tests/site_scons/site_tools/nanopb.py
index 9197e190..b3e58fa1 100644
--- a/tests/site_scons/site_tools/nanopb.py
+++ b/tests/site_scons/site_tools/nanopb.py
@@ -57,8 +57,8 @@ def _detect_protoc(env):
# Use protoc defined by user
return env['PROTOC']
- p = _detect_nanopb(env)
- p1 = os.path.join(p, 'generator-bin', 'protoc' + env['PROGSUFFIX'])
+ n = _detect_nanopb(env)
+ p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX'])
if os.path.exists(p1):
# Use protoc bundled with binary package
return env['ESCAPE'](p1)
@@ -78,7 +78,8 @@ def _detect_protocflags(env):
p = _detect_protoc(env)
n = _detect_nanopb(env)
- if p == os.path.join(n, 'generator-bin', 'protoc'):
+ p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX'])
+ if p == env['ESCAPE'](p1):
# Using the bundled protoc, no options needed
return ''