From 3f82819745be54edd3bd8a83639605e58826bfe9 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 31 May 2022 15:48:54 +0200 Subject: [PATCH] Fix output for prerelease version of poetry (#409) --- dist/setup/index.js | 2 +- src/cache-distributions/poetry-cache.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index b664896be..60ad85859 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63920,7 +63920,7 @@ class PoetryCache extends cache_distributor_1.default { const lines = stdout.trim().split('\n'); const config = {}; for (let line of lines) { - line = line.replace(/#.*$/, ''); + line = line.replace(/#.*$/gm, ''); const [key, value] = line.split('=').map(part => part.trim()); config[key] = JSON.parse(value); } diff --git a/src/cache-distributions/poetry-cache.ts b/src/cache-distributions/poetry-cache.ts index 58aa5fd97..5e22b5dd7 100644 --- a/src/cache-distributions/poetry-cache.ts +++ b/src/cache-distributions/poetry-cache.ts @@ -58,7 +58,7 @@ class PoetryCache extends CacheDistributor { const config: any = {}; for (let line of lines) { - line = line.replace(/#.*$/, ''); + line = line.replace(/#.*$/gm, ''); const [key, value] = line.split('=').map(part => part.trim());