diff Jenkinsfile @ 7591:5867f45810da

cli: fix 'front-end-build' on Windows (Issue #332) On Windows, the command 'npm' is actually 'npm.cmd', a script and not a PE executable. 'subprocess' will not resolve 'npm' into 'npm.cmd', while it would resolve e.g. 'git' into 'git.exe', as the latter _is_ a PE executable. One solution is to change all references to the problematic scripts by adding the '.cmd' extension explicitly, but this would not be compatible with UNIX systems and thus require special handling. On Windows, the problem can be solved by passing 'shell=True' to subprocess. On UNIX, we don't need shell=True and prefer shell=False. A solution that fits both cases is 'shell=kallithea.is_windows'. Note: on Windows, next to the 'npm.cmd' file (and same for license-checker etc.) there is also a file 'npm' (without extension). It is a shell script (interpreter /bin/sh) for use on Windows with mingw/msys/cygwin. This script will nevertheless never be used by the standard Windows command prompt and is not used by Kallithea.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Mon, 18 Mar 2019 22:25:30 +0100
parents 58713c2ebfff
children d9e37f7fd35b
line wrap: on
line diff