diff options
-rw-r--r-- | bpkg/bpkg.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 4af4140..b5eaf7d 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -158,6 +158,17 @@ namespace bpkg if (bo.help () || bo.version ()) fail << "--help or --version specified with --build-option"; + + // Make sure someone didn't specify a non-global override with + // --build-option, which messes our global/package-specific config + // variable split. + // + for (const string& v: bc.cmd_vars) + { + if (v[0] != '!') + fail << "non-global configuration variable '" << v + << "' specified with --build-option"; + } } build2_cmd_vars = move (bc.cmd_vars); |