|
|
@@ -641,6 +641,7 @@ This module is also a native module of lua, and xmake has been extended to provi
|
|
|
| [os.subarch](#ossubarch) | Get Subsystem host architecture | >= 2.3.1 |
|
|
|
| [os.features](#osfeatures) | Get features | >= 2.3.1 |
|
|
|
| [os.getenvs](#osgetenvs) | Get all current environment variables | >= 2.2.6 |
|
|
|
+| [os.addenv](#osaddenv) | Add values to environment variable | >= 2.1.5 |
|
|
|
|
|
|
#### os.cp
|
|
|
|
|
|
@@ -1074,6 +1075,15 @@ local envs = os.getenvs()
|
|
|
print(envs["HOME"])
|
|
|
```
|
|
|
|
|
|
+### os.addenv
|
|
|
+
|
|
|
+- Add values to environment variable
|
|
|
+
|
|
|
+```lua
|
|
|
+-- Add 'bin' to PATH
|
|
|
+os.addenv("PATH", "bin")
|
|
|
+```
|
|
|
+
|
|
|
### winos
|
|
|
|
|
|
The windows system operation module is a built-in module, no need to use [import](#import) to import, you can directly call its interface in the script domain.
|