Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Add a note about empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryouze committed Sep 25, 2024
1 parent edc68c4 commit 4a85b03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace core::env {
* @param name Name of the environment variable (e.g., "SHELL").
*
* @return Value of the environment variable if succeeded (e.g., "/bin/zsh"), std::nullopt otherwise.
*
* @note This might be an empty string if the environment variable is set but empty.
*/
[[nodiscard]] std::optional<std::string> get_variable(const std::string &name);

Expand Down

0 comments on commit 4a85b03

Please sign in to comment.