scripts: zephyr_module: hack to match west 0.7 output
The west command line output is not stable and has changed for 0.7. Match it in zephyr_module.py's check for whether we are in a workspace. The real fix is to start using 'west topdir' whenever the west version is at least 0.7. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
17144489d9
commit
dc1edb946f
|
@ -188,10 +188,14 @@ def main():
|
||||||
if p.returncode == 0:
|
if p.returncode == 0:
|
||||||
projects = out.decode(sys.getdefaultencoding()).splitlines()
|
projects = out.decode(sys.getdefaultencoding()).splitlines()
|
||||||
elif re.match((r'Error: .* is not in a west installation\.'
|
elif re.match((r'Error: .* is not in a west installation\.'
|
||||||
'|FATAL ERROR: no west installation found from .*'),
|
'|FATAL ERROR: no west installation found from .*'
|
||||||
|
'|FATAL ERROR: no west workspace.*'),
|
||||||
err.decode(sys.getdefaultencoding())):
|
err.decode(sys.getdefaultencoding())):
|
||||||
# Only accept the error from bootstrapper in the event we are
|
# Only accept the error the event we are outside a west
|
||||||
# outside a west managed project.
|
# workspace.
|
||||||
|
#
|
||||||
|
# TODO: we can just use "west topdir" instead if we can
|
||||||
|
# depend on west 0.7.0 or later.
|
||||||
projects = []
|
projects = []
|
||||||
else:
|
else:
|
||||||
print(err.decode(sys.getdefaultencoding()))
|
print(err.decode(sys.getdefaultencoding()))
|
||||||
|
|
Loading…
Reference in a new issue