mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(container-creation): Fix bad env in container creation (#2996)
Currently we are using RegExp `/\=(.+)/` to catch key-value of environment variables, which could not match empty-value environment variables such as `KEY=`. This commit will change the RegExp to `/\=(.*)/`, which matches the empty values.
This commit is contained in:
parent
0175490161
commit
c559b6b55c
1 changed files with 1 additions and 1 deletions
|
@ -393,7 +393,7 @@ function ($q, $scope, $async, $state, $timeout, $transition$, $filter, Container
|
||||||
var envArr = [];
|
var envArr = [];
|
||||||
for (var e in $scope.config.Env) {
|
for (var e in $scope.config.Env) {
|
||||||
if ({}.hasOwnProperty.call($scope.config.Env, e)) {
|
if ({}.hasOwnProperty.call($scope.config.Env, e)) {
|
||||||
var arr = $scope.config.Env[e].split(/\=(.+)/);
|
var arr = $scope.config.Env[e].split(/\=(.*)/);
|
||||||
envArr.push({'name': arr[0], 'value': arr[1]});
|
envArr.push({'name': arr[0], 'value': arr[1]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue