@@ -14,7 +14,7 @@ extern "C" const size_t DefaultScriptDependencies_size;
1414
1515namespace
1616{
17- bool ParseCompilerProfiles ( const std::string& compilerProfilesString ,
17+ bool ParseUserConfig ( const std::string& userConfigString ,
1818 std::vector<runcpp2::Data::CompilerProfile>& outProfiles,
1919 std::string& outPreferredProfile)
2020 {
@@ -36,7 +36,7 @@ namespace
3636
3737 INTERNAL_RUNCPP2_SAFE_START ();
3838
39- std::string temp = compilerProfilesString ;
39+ std::string temp = userConfigString ;
4040 ryml::Tree rootTree = ryml::parse_in_place (c4::to_substr (temp));
4141 ryml::ConstNodeRef rootCompilerProfileNode;
4242
@@ -109,12 +109,12 @@ bool runcpp2::ReadUserConfig( std::vector<Data::CompilerProfile>& outProfiles,
109109
110110 std::string compilerConfigFilePaths[2 ] =
111111 {
112- configDir + " /CompilerProfiles .yaml" ,
113- configDir + " /CompilerProfiles .yml"
112+ configDir + " /UserConfig .yaml" ,
113+ configDir + " /UserConfig .yml"
114114 };
115115 int foundConfigFilePathIndex = -1 ;
116116
117- bool writeDefaultProfiles = true ;
117+ bool writeDefaultConfig = true ;
118118
119119 // config directory is created by get_user_config_folder if it doesn't exist
120120 {
@@ -124,14 +124,14 @@ bool runcpp2::ReadUserConfig( std::vector<Data::CompilerProfile>& outProfiles,
124124 if (ghc::filesystem::exists (compilerConfigFilePaths[i]))
125125 {
126126 foundConfigFilePathIndex = i;
127- writeDefaultProfiles = false ;
127+ writeDefaultConfig = false ;
128128 break ;
129129 }
130130 }
131131 }
132132
133133 // Create default compiler profiles
134- if (writeDefaultProfiles )
134+ if (writeDefaultConfig )
135135 {
136136 // Create default compiler profiles
137137 std::ofstream configFile (compilerConfigFilePaths[0 ], std::ios::binary);
@@ -146,22 +146,22 @@ bool runcpp2::ReadUserConfig( std::vector<Data::CompilerProfile>& outProfiles,
146146 }
147147
148148 // Read compiler profiles
149- std::string compilerConfigContent ;
149+ std::string userConfigContent ;
150150 {
151- std::ifstream compilerConfigFilePath (compilerConfigFilePaths[foundConfigFilePathIndex]);
152- if (!compilerConfigFilePath )
151+ std::ifstream userConfigFilePath (compilerConfigFilePaths[foundConfigFilePathIndex]);
152+ if (!userConfigFilePath )
153153 {
154154 ssLOG_ERROR (" Failed to open config file: " <<
155155 compilerConfigFilePaths[foundConfigFilePathIndex]);
156156
157157 return false ;
158158 }
159159 std::stringstream buffer;
160- buffer << compilerConfigFilePath .rdbuf ();
161- compilerConfigContent = buffer.str ();
160+ buffer << userConfigFilePath .rdbuf ();
161+ userConfigContent = buffer.str ();
162162 }
163163
164- if (!ParseCompilerProfiles (compilerConfigContent , outProfiles, outPreferredProfile))
164+ if (!ParseUserConfig (userConfigContent , outProfiles, outPreferredProfile))
165165 {
166166 ssLOG_ERROR (" Failed to parse config file: " <<
167167 compilerConfigFilePaths[foundConfigFilePathIndex]);
0 commit comments