Environment Service
The Environment
service offers access to the system environment or process environment.
Available Operations
currentEnv
Environment.currentEnv(): { [key: string]: string; }
Returns the environment of Qbs in the current context as an object whose properties are the environment variables.
getEnv
Environment.getEnv(key: string): string
Tries to find a variable with the given name in the current context's environment and returns its value. If no such variable could be found, undefined
is returned.
putEnv
Environment.putEnv(key: string, value: string): void
Sets the value of the environment variable with the given name in the build or run environment. This method is only available in the Module.setupBuildEnvironment
and Module.setupRunEnvironment
scripts.
unsetEnv
Environment.unsetEnv(key: string): void
Unsets the environment variable with the given name from the build or run environment. This method is only available in the Module.setupBuildEnvironment
and Module.setupRunEnvironment
scripts.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.