env: Remove quotes when parsing a config env file (#13953)

The code parsing the config environment file does not remove 
quotes of environment variables values. This commit adds this 
capability.
This commit is contained in:
Anis Elleuch
2021-12-20 22:13:06 +01:00
committed by GitHub
parent 364e27d5f2
commit 5cc16e098c
2 changed files with 34 additions and 2 deletions

View File

@@ -45,6 +45,26 @@ export MINIO_ROOT_PASSWORD=minio123`,
},
},
},
// Value with double quotes
{`export MINIO_ROOT_USER="minio"`,
false,
[]envKV{
{
Key: "MINIO_ROOT_USER",
Value: "minio",
},
},
},
// Value with single quotes
{`export MINIO_ROOT_USER='minio'`,
false,
[]envKV{
{
Key: "MINIO_ROOT_USER",
Value: "minio",
},
},
},
{`
MINIO_ROOT_USER=minio
MINIO_ROOT_PASSWORD=minio123`,