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
George Cheng 2019-11-01 11:15:33 +08:00 committed by Anthony Lapenna
parent 0175490161
commit c559b6b55c
1 changed files with 1 additions and 1 deletions

View File

@ -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]});
}
}