Skip to content

Commit e469802

Browse files
Brian DanielsDatabean
authored andcommitted
Prevents a fetcher_config error message from being printed
The following message is always printed when calling `cvd create`: Could not read config file /mnt/external_ssd/main/out/target/product/vsoc_x86_64/fetcher_config.json: * Line 1, Column 1 Syntax error: value, object or array expected. However, this file never exists (at least in my development setup). So add a check to ensure the file exists first before trying to parse it. Bug: 519542446 Test: cvd create
1 parent 4f1f0a7 commit e469802

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

base/cvd/cuttlefish/host/libs/config/fetcher_configs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ FetcherConfigs FetcherConfigs::ReadFromDirectories(
6161

6262
std::string path = absl::StrCat(real, "/", kFetcherConfigFile);
6363

64-
if (!it->second.LoadFromFile(path)) {
64+
if (FileExists(path) && !it->second.LoadFromFile(path)) {
6565
VLOG(0) << "No valid fetcher_config in '" << path
6666
<< "', falling back to default";
6767
}

0 commit comments

Comments
 (0)