-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logger warning to monit and edit mode for vm
- Loading branch information
1 parent
43f6ecd
commit 58a8c13
Showing
2 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
use super::system::inside_docker; | ||
use super::system::{inside_docker, inside_wsl}; | ||
use super::warn_user; | ||
use crate::system::inside_wsl; | ||
|
||
pub fn inside_wsl_message() -> String { | ||
String::from( | ||
"ACS is intended to run on an actual linux distribution, \ | ||
the program will NOT work inside of Windows Subsystem for Linux \ | ||
Please install an actual distribution of Linux.", | ||
) | ||
} | ||
|
||
pub fn inside_docker_message() -> String { | ||
String::from("Stats may be incorrect if running inside docker.") | ||
} | ||
|
||
pub fn setup() { | ||
if inside_wsl() { | ||
warn_user!( | ||
"ACS is intended to run on an actual linux distribution, \ | ||
the program will NOT work inside of Windows Subsystem for Linux \ | ||
Please install an actual distribution of Linux" | ||
); | ||
warn_user!(inside_wsl_message()); | ||
} | ||
if inside_docker() { | ||
warn_user!("Stats may be incorrect if running inside docker."); | ||
warn_user!(inside_docker_message()); | ||
} | ||
} |