cmake: zephyr_modules: Add west executable argument
On some systems where you don't have access to `PATH` and you can't
set the `ENV{PATH}` variable. You need to be able to pass the path
to the west executable down to the python script so it is better
for it to be set explicitly than assuming that it exsists as a
part of the PATH/executables in the shell being called.
Signed-off-by: Sigvart M. Hovland <sigvart.hovland@nordicsemi.no>
diff --git a/scripts/zephyr_module.py b/scripts/zephyr_module.py
index 485eac3..f384e81 100755
--- a/scripts/zephyr_module.py
+++ b/scripts/zephyr_module.py
@@ -119,10 +119,12 @@
'list`')
parser.add_argument('-x', '--extra-modules', nargs='+',
help='List of extra modules to parse')
+ parser.add_argument('-w', '--west-path', default='west',
+ help='Path to west executable')
args = parser.parse_args()
if args.modules is None:
- p = subprocess.Popen(['west', 'list', '--format={posixpath}'],
+ p = subprocess.Popen([args.west_path, 'list', '--format={posixpath}'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate()