updates and fixes

This commit is contained in:
Mars 2025-04-14 14:05:33 -04:00
parent 6dd18ac26e
commit 7fa06ae18c
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
4 changed files with 14 additions and 13 deletions

12
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1741678040, "lastModified": 1744536153,
"narHash": "sha256-rmBsz7BBcDwfvDkxnKHmolKceGJrr0nyz5PQYZg0kMk=", "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3ee8818da146871cd570b164fc4f438f78479a50", "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +59,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1739829690, "lastModified": 1743748085,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204", "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -33,16 +33,16 @@ namespace {
possiblePaths.push_back(fs::path(".") / "config.toml"); possiblePaths.push_back(fs::path(".") / "config.toml");
#else #else
// Unix/Linux paths in order of preference // Unix/Linux paths in order of preference
if (auto result = getEnv("XDG_CONFIG_HOME"); result) if (auto result = GetEnv("XDG_CONFIG_HOME"); result)
possiblePaths.push_back(fs::path(*result) / "draconis++" / "config.toml"); possiblePaths.emplace_back(fs::path(*result) / "draconis++" / "config.toml");
if (auto result = getEnv("HOME"); result) { if (auto result = GetEnv("HOME"); result) {
possiblePaths.push_back(fs::path(*result) / ".config" / "draconis++" / "config.toml"); possiblePaths.emplace_back(fs::path(*result) / ".config" / "draconis++" / "config.toml");
possiblePaths.push_back(fs::path(*result) / ".draconis++" / "config.toml"); possiblePaths.emplace_back(fs::path(*result) / ".draconis++" / "config.toml");
} }
// System-wide config // System-wide config
possiblePaths.push_back(fs::path("/etc/draconis++/config.toml")); possiblePaths.emplace_back("/etc/draconis++/config.toml");
#endif #endif
// Check if any of these configs already exist // Check if any of these configs already exist

View file

@ -8,6 +8,7 @@
#include <fmt/color.h> #include <fmt/color.h>
#include <fmt/format.h> #include <fmt/format.h>
#include <source_location> #include <source_location>
#include <utility>
#include "types.h" #include "types.h"

View file

@ -2,10 +2,10 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <expected>
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
#include <expected>
// ReSharper disable once CppUnusedIncludeDirective // ReSharper disable once CppUnusedIncludeDirective
#include <guiddef.h> #include <guiddef.h>
#include <variant> #include <variant>