Skip to content

Commit

Permalink
Clarify docs for os.getenv.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisant996 committed Dec 27, 2020
1 parent a0da1a5 commit e797a14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clink/lua/src/os_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ int glob_files(lua_State* state)
/// -ret: string | nil
/// Returns the value of the named environment variable, or nil if it doesn't
/// exist.
///
/// Note that <code>os.getenv("HOME")</code> receives special treatment: if
/// %HOME% is not set then it is synthesized from %HOMEDRIVE% and %HOMEPATH%, or
/// from %USERPROFILE%.
int get_env(lua_State* state)
{
const char* name = get_string(state, 1);
Expand Down

0 comments on commit e797a14

Please sign in to comment.