mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
Trim environment variables
This commit is contained in:
parent
d0bb4fde27
commit
8ad8e7a9fc
|
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Environment variable values are now trimmed (whitespace is removed)
|
||||
|
||||
## [0.5.2] - 2022-01-29
|
||||
### Fixed
|
||||
|
|
|
@ -38,7 +38,7 @@ export default class Config {
|
|||
if (typeof value === 'number') {
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, number>] = value;
|
||||
} else if (typeof value === 'string') {
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, string>] = value;
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, string>] = value.trim();
|
||||
} else {
|
||||
throw new Error(`Unsupported type for ${key}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue