Skip to content

Commit

Permalink
Merge pull request #7 from lpaulic/bugfix/default-path-for-windows
Browse files Browse the repository at this point in the history
fix: make configuration default path platform dependant
  • Loading branch information
lpaulic authored Aug 18, 2023
2 parents 73c5190 + a69584b commit 5879ac9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.4.2] - 2023-08-18

### Fixed
- conditional compilation for default path depending on platform

## [0.4.1] - 2023-08-18

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tum"
version = "0.4.0"
version = "0.4.2"
edition = "2021"
authors = ["Luka Paulic <luka.paulic0@gmail.com>"]
description = "System usage monitoring for a friend"
Expand Down
3 changes: 3 additions & 0 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ use crate::configuration::{Configuration, ConfigurationError};
use crate::monitor::{ResourceMonitor, ResourceMonitorError};
use crate::mqtt_client::MqttClient;

#[cfg(target_family = "unix")]
const DEFAULT_CONFIGURATION_PATH_STR: &str = "/etc/tum/configuration.yml";
#[cfg(target_family = "windows")]
const DEFAULT_CONFIGURATION_PATH_STR: &str = "C:\\Program Files\\tum\\configuration.yml";

#[derive(Debug, Parser)]
#[command(name = "tum")]
Expand Down

0 comments on commit 5879ac9

Please sign in to comment.