@@ -88,7 +88,7 @@ int main(int argc, char* argv[])
8888 // std::unordered_set<runcpp2::CmdOptions> currentOptions;
8989
9090 {
91- static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 7 , " Update this" );
91+ static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 8 , " Update this" );
9292 std::unordered_map<std::string, runcpp2::OptionInfo> longOptionsMap =
9393 {
9494 {
@@ -114,18 +114,23 @@ int main(int argc, char* argv[])
114114 {
115115 " --local" ,
116116 runcpp2::OptionInfo (runcpp2::CmdOptions::LOCAL, false )
117+ },
118+ {
119+ " --show-config-path" ,
120+ runcpp2::OptionInfo (runcpp2::CmdOptions::SHOW_USER_CONFIG, false )
117121 }
118122 };
119123
120- static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 7 , " Update this" );
124+ static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 8 , " Update this" );
121125 std::unordered_map<std::string, const runcpp2::OptionInfo&> shortOptionsMap =
122126 {
123127 {" -r" , longOptionsMap.at (" --reset-cache" )},
124128 {" -c" , longOptionsMap.at (" --reset-user-config" )},
125129 {" -e" , longOptionsMap.at (" --executable" )},
126130 {" -h" , longOptionsMap.at (" --help" )},
127131 {" -d" , longOptionsMap.at (" --remove-dependencies" )},
128- {" -l" , longOptionsMap.at (" --local" )}
132+ {" -l" , longOptionsMap.at (" --local" )},
133+ {" -s" , longOptionsMap.at (" --show-config-path" )}
129134 };
130135
131136 currentArgIndex = ParseArgs (longOptionsMap, shortOptionsMap, currentOptions, argc, argv);
@@ -142,7 +147,7 @@ int main(int argc, char* argv[])
142147 // Help message
143148 if (currentOptions.count (runcpp2::CmdOptions::HELP))
144149 {
145- static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 7 , " Update this" );
150+ static_assert (static_cast <int >(runcpp2::CmdOptions::COUNT) == 8 , " Update this" );
146151 ssLOG_BASE (" Usage: runcpp2 [options] [input_file]" );
147152 ssLOG_BASE (" Options:" );
148153 ssLOG_BASE (" -r, --[r]eset-cache Deletes all cache and build everything from scratch" );
@@ -151,10 +156,17 @@ int main(int argc, char* argv[])
151156 ssLOG_BASE (" -h, --[h]elp Show this help message" );
152157 ssLOG_BASE (" -d, --remove-[d]ependencies Remove dependencies listed in the script" );
153158 ssLOG_BASE (" -l, --[l]ocal Build the script and dependencies locally" );
159+ ssLOG_BASE (" -s, --[s]how-config-path Show where runcpp2 is reading the config from" );
154160
155161 return 0 ;
156162 }
157163
164+ if (currentOptions.count (runcpp2::CmdOptions::SHOW_USER_CONFIG))
165+ {
166+ ssLOG_BASE (runcpp2::GetConfigFilePath ());
167+ return 0 ;
168+ }
169+
158170 // Resetting user config
159171 if (currentOptions.count (runcpp2::CmdOptions::RESET_USER_CONFIG))
160172 {
0 commit comments