mirror of https://github.com/portainer/portainer
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.pull/3324/head
parent
0175490161
commit
c559b6b55c
|
@ -393,7 +393,7 @@ function ($q, $scope, $async, $state, $timeout, $transition$, $filter, Container
|
|||
var envArr = [];
|
||||
for (var e in $scope.config.Env) {
|
||||
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]});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue