Skip to content

Commit

Permalink
Remove generated file if using code command line parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatRambler committed Dec 31, 2021
1 parent 6481c3c commit 6fce7f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,11 @@ int main(int argc, char** argv) {
levels["subworld"]->ExportToJSON(result["subworldJson"].as<std::string>());
}
}

if(result.count("code")) {
std::filesystem::remove(path);
}

return 0;
} else {
fmt::print("Path {} does not exist\n", path);
Expand Down

0 comments on commit 6fce7f8

Please sign in to comment.