-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
50 additions
and
51 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
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,18 +1,18 @@ | ||
local _os = require "os" | ||
local _eenvLoaded, _eenv = pcall(require, "eli.env.extra") | ||
local os = require"os" | ||
local is_loaded, eenv = pcall(require, "eli.env.extra") | ||
|
||
local _util = require "eli.util" | ||
local util = require"eli.util" | ||
|
||
local _env = { | ||
get_env = _eenvLoaded and _eenv.get_env or _os.getenv, | ||
local env = { | ||
get_env = is_loaded and eenv.get_env or os.getenv, | ||
---#DES env.EENV | ||
--- | ||
---@type boolean | ||
EENV = _eenvLoaded | ||
EENV = is_loaded, | ||
} | ||
|
||
if not _eenvLoaded then | ||
return _env | ||
if not is_loaded then | ||
return env | ||
end | ||
|
||
return _util.merge_tables(_env, _eenv) | ||
return util.merge_tables(env, eenv) |
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