mirror of
https://github.com/CHN-beta/hpcstat.git
synced 2024-10-22 20:18:44 +08:00
13 lines
287 B
C++
13 lines
287 B
C++
# pragma once
|
|
# include <optional>
|
|
# include <string>
|
|
|
|
namespace hpcstat::env
|
|
{
|
|
// check if the program is running in an interactive shell
|
|
bool interactive();
|
|
|
|
// get the value of an environment variable
|
|
std::optional<std::string> env(std::string name, bool required = false);
|
|
}
|