[users at bb.net] Possible Windows compatibility problem in www/base
Trevor Hook
trevor.k.hook at googlemail.com
Mon Mar 23 21:42:02 UTC 2020
For cross platform compatibility, not specific to builbot config, I often do something along the lines of:
pathway = 'path/to/file'
pathway_parts = pathway.split('/')
pathway_combined = str(os.path.join(pathway_parts))
i.e. I'm setting paths as a str for human readable convenience, splitting it into component parts and then using some platform independent path package to recombine the components into the local systems expectation of a path string.
In Python3, I tend to use pathlib Path rather than is.path, mainly because I tend to be working with Path objects anyway.
Trevor
On 23 March 2020 21:03:12 GMT, "Yngve N. Pettersen" <yngve at vivaldi.com> wrote:
>Hello all,
>
>I am currently trying to update our customized buildbot instance, and
>have
>been running into problems when trying to build our modified www/base
>package.
>
>I am running "yarn build" on Windows, in a Git Bash shell, but the
>build
>failed
>
>I got this message:
>
>-------------------
>'.' is not recognized as an internal or external command,
>operable program or batch file.
>www\base\node_modules\webpack-shell-plugin\lib\index.js:168
> throw error;
> ^
>
>Error: Command failed: ./node_modules/.bin/pug src/app/index.jade -o
>buildbot_www/static/
>'.' is not recognized as an internal or external command,
>operable program or batch file.
>
> at ChildProcess.exithandler (child_process.js:303:12)
> at ChildProcess.emit (events.js:311:20)
> at maybeClose (internal/child_process.js:1021:16)
> at Socket.<anonymous> (internal/child_process.js:443:11)
> at Socket.emit (events.js:311:20)
> at Pipe.<anonymous> (net.js:668:12) {
> killed: false,
> code: 1,
> signal: null,
>cmd: './node_modules/.bin/pug src/app/index.jade -o
>buildbot_www/static/'
>
>-------------------
>
>I have just confirmed that the problem is "/" vs "\" (forward vs.
>backward
>slash).
>
>Change the following lines in www/base/webpack.config.js from
>
> new WebpackShellPlugin({
> onBuildEnd:['./node_modules/.bin/pug src/app/index.jade -o
>buildbot_www/static/']
> }),
>
>
>to
>
> new WebpackShellPlugin({
> onBuildEnd:['.\\node_modules\\.bin\\pug src/app/index.jade -o
>buildbot_www/static/']
> }),
>
>and the build works.
>
>This is probably a problem caused by webpack, but maybe you know how to
>
>work around it?
>
>In the meantime I am patching the file locally.
More information about the users
mailing list