summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-21 09:43:39 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-21 09:43:39 +0200
commitf4c3192d0a558cae80b1e601b64deb0c6ae3a0ff (patch)
treea4b286d2edfc32f66e52c0f17e39fcc5ac38d739
parentdc81583fb78ae625e8ae7fe9c1cdc42ede653afa (diff)
Main: Fixup --dump-extension-api after #54017
That removal was correct, but triggered a bug in our messy-as-heck main.cpp detection logic for editor/project manager/project/command line tool... Fixing this is for another day.
-rw-r--r--.gitignore3
-rw-r--r--main/main.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 5b3414fe7e..5a8f6aec40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,9 @@
# Documentation generated by doxygen or from classes.xml
doc/_build/
+# Extension API dump
+extension_api.json
+
# Javascript specific
*.bc
diff --git a/main/main.cpp b/main/main.cpp
index 2a9446d4ed..f0bc51c10f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -918,6 +918,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
cmdline_tool = true;
dump_extension_api = true;
print_line("Dumping Extension API");
+ // Hack. Not needed but otherwise we end up detecting that this should
+ // run the project instead of a cmdline tool.
+ // Needs full refactoring to fix properly.
+ main_args.push_back(I->get());
} else if (I->get() == "--export" || I->get() == "--export-debug" ||
I->get() == "--export-pack") { // Export project
// Actually handling is done in start().