Skip to content

Commit

Permalink
Ensure --export implies --editor
Browse files Browse the repository at this point in the history
  • Loading branch information
bojidar-bg committed Jun 28, 2019
1 parent 2df8b56 commit 9ebc146
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph

auto_build_solutions = true;
editor = true;
} else if (I->get() == "--export" || I->get() == "--export-debug") { // Export project

editor = true;
main_args.push_back(I->get());
#endif
} else if (I->get() == "--path") { // set path of project to start or edit

Expand Down Expand Up @@ -1343,20 +1347,10 @@ bool Main::start() {
removal_docs.push_back(args[j]);
} else if (args[i] == "--export") {
editor = true; //needs editor
if (i + 1 < args.size()) {
_export_preset = args[i + 1];
} else {
ERR_PRINT("Export preset name not specified");
return false;
}
_export_preset = args[i + 1];
} else if (args[i] == "--export-debug") {
editor = true; //needs editor
if (i + 1 < args.size()) {
_export_preset = args[i + 1];
} else {
ERR_PRINT("Export preset name not specified");
return false;
}
_export_preset = args[i + 1];
export_debug = true;
#endif
} else {
Expand Down

0 comments on commit 9ebc146

Please sign in to comment.