Fix parsing of secrets containing '=' character

Signed-off-by: Mathieu Bergeron <mathieu.bergeron@nuecho.com>
This commit is contained in:
Mathieu Bergeron 2020-10-23 12:21:44 -04:00
parent c58c6870a2
commit fc7e9a2b38
4 changed files with 154 additions and 3185 deletions

View file

@ -18,7 +18,9 @@ export async function getImageID(): Promise<string | undefined> {
}
export async function getSecret(kvp: string): Promise<string> {
const [key, value] = kvp.split('=');
const sepIndex = kvp.indexOf('=');
const key = kvp.substr(0, sepIndex);
const value = kvp.substr(sepIndex + 1);
const secretFile = context.tmpNameSync({
tmpdir: context.tmpDir()
});