File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,16 @@ class CommandLineConfig {
8989 exit (0 );
9090 }
9191
92+ if (write_config.value () != " " ) {
93+ std::ofstream ofs (write_config.value ());
94+ if (!ofs.is_open ()) {
95+ std::cerr << " Unable to write config file!" << std::endl;
96+ exit (1 );
97+ }
98+ write_config_file (ofs, argv[0 ]);
99+ exit (0 );
100+ }
101+
92102 auto missing_arg = false ;
93103 for (auto it = Args::arg_begin (); it != Args::arg_end (); ++it) {
94104 auto arg = *it;
@@ -104,16 +114,6 @@ class CommandLineConfig {
104114 if (missing_arg) {
105115 exit (1 );
106116 }
107-
108- if (write_config.value () != " " ) {
109- std::ofstream ofs (write_config.value ());
110- if (!ofs.is_open ()) {
111- std::cerr << " Unable to write config file!" << std::endl;
112- exit (1 );
113- }
114- write_config_file (ofs, argv[0 ]);
115- exit (0 );
116- }
117117 }
118118
119119 private:
You can’t perform that action at this time.
0 commit comments