diff --git a/src/mp/gen.cpp b/src/mp/gen.cpp index 4a0c1ccf..36ba16a8 100644 --- a/src/mp/gen.cpp +++ b/src/mp/gen.cpp @@ -598,6 +598,9 @@ int main(int argc, char** argv) auto fs = kj::newDiskFilesystem(); auto cwd = fs->getCurrentPath(); #endif + for (size_t i = 4; i < argc; ++i) { + import_paths.push_back(argv[i]); + } for (const char* path : {CMAKE_INSTALL_PREFIX "/include", capnp_PREFIX "/include"}) { #ifdef HAVE_KJ_FILESYSTEM KJ_IF_MAYBE(dir, fs->getRoot().tryOpenSubdir(cwd.evalNative(path))) { import_paths.emplace_back(path); } @@ -605,9 +608,6 @@ int main(int argc, char** argv) import_paths.emplace_back(path); #endif } - for (size_t i = 4; i < argc; ++i) { - import_paths.push_back(argv[i]); - } Generate(argv[1], argv[2], argv[3], {import_paths.data(), import_paths.size()}); return 0; }