[build2] [bug-report] Parsing options-file fails when quoted value have spaces

Klaim - Joël Lamotte mjklaim at gmail.com
Thu Feb 14 14:28:51 UTC 2019

Hello, I think I hit a bug.
I want to reproduce something like this command but using
`--options-file` for the options:

    > bdep init -C ../build-vs2015/ cc config.cc.poptions="/Iaaa /Ibbb"

This command works (as expected).

I add an option file "./mysetup.config":

    config.cc.poptions="/Iaaa /Ibbb"

Then the command fails (unexpected):

    > bdep init -C ../build-vs2015/ cc --options-file ./mysetup.config
        error: unmatched quote in argument '/Ibbb"'

If I remove the spaces in "mysetup.config":

Then it works (expected):

    > bdep init -C ../build-vs2015/ cc --options-file ./mysetup.config
    initializing in project G:\work\libqi-build2\libqi\

I'm considering this a bug as the doc says:
"The semantics of providing options in a file is equivalent to
providing the same set of options in the same order on the command
line at the point where the --options-file option is specified except
that the shell escaping and quoting is not required. "

Which is not the case here.

A. Joël Lamotte

Build2 version:

> b --version
build2 0.9.0-a.0.28fb279aba3a
libbutl 0.9.0-a.0.f7dc4934b04c
host x86_64-microsoft-win32-msvc14.1
Copyright (c) 2014-2018 Code Synthesis Ltd
This is free software released under the MIT license.

More information about the users mailing list