You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ [environment] Add GetEnvironmentVariable() to try and fetch specific environment variable (#328)
<!--
Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors.
All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
### Description
<!--
Please add any detail or context that would be useful to a reviewer.
-->
- Add `GetEnvironmentVariable()` to try and fetch specific environment
variable
- Support `.env` files
### Test Coverage
<!--
Please put an `x` in the correct box e.g. `[x]` to indicate the testing
coverage of this change.
-->
- [x] This change is covered by existing or additional automated tests.
- [ ] Manual testing has been performed (and evidence provided) as
automated testing was not feasible.
- [ ] Additional tests are not required for this change (e.g.
documentation update).
---------
Co-authored-by: Adrien CABARBAYE <adrien.cabarbaye@arm.com>
:sparkles: [`environment`] Extend `GetEnvironmentVariables()` to accept optional ...dotEnvFiles so that [.env](https://github.com/bkeepers/dotenv) files can be loaded into the current environment
// GetFilesystem returns the filesystem associated with the current environment
36
37
GetFilesystem() filesystem.FS
38
+
// GetEnvironmentVariable returns the environment variable corresponding to `envvar` or an error if it not set. optionally it searches `dotEnvFiles` files too
39
+
// `dotEnvFiles` corresponds to `.env` files present on the machine and follows the mechanism described by https://github.com/bkeepers/dotenv
0 commit comments