Skip to content

Commit

Permalink
workflow: you gotta be shittying me
Browse files Browse the repository at this point in the history
Ubuntu doesn't have "NAME=" in /etc/os-release???????
  • Loading branch information
Toni500github committed Jun 18, 2024
1 parent e273024 commit fdc4d95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
std::string Display::detect_distro() {
std::string file_path;

debug("/etc/os-release = \n{}", shell_exec("cat /etc/os-release"));
if (!config.m_custom_distro.empty())
{
file_path = fmt::format("{}/ascii/{}.txt", CUSTOMFETCH_DATA_DIR, config.m_custom_distro);
Expand Down
4 changes: 2 additions & 2 deletions src/query/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ std::string System::os_name() {

std::string line;
while (std::getline(os_release_file, line)) {
if(line.find("NAME=") != std::string::npos) {
os_pretty_name = line.substr(5);
if(line.find("ID=") != std::string::npos) {
os_pretty_name = line.substr(3);
os_pretty_name.erase(std::remove(os_pretty_name.begin(), os_pretty_name.end(), '\"'), os_pretty_name.end());

return os_pretty_name;
Expand Down

0 comments on commit fdc4d95

Please sign in to comment.