Skip to content

Commit

Permalink
Merge cf0f9e9 into 4ba21e4
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottGarman committed Nov 19, 2015
2 parents 4ba21e4 + cf0f9e9 commit fe554f0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/inc/internal/facts/linux/os_cisco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,17 @@ namespace facter { namespace facts { namespace linux {
return value;
}
auto val = _release_info.find("ID_LIKE");
return (val != _release_info.end()) ? val->second : std::string();
if (val != _release_info.end()) {
auto& family = val->second;
auto pos = family.find(" ");
// If multiple values are found in ID_LIKE, only return the
// first one (FACT-1246)
if (pos != std::string::npos) {
return family.substr(0, pos);
}
return family;
}
return std::string();
}

/**
Expand Down

0 comments on commit fe554f0

Please sign in to comment.