Skip to content
Snippets Groups Projects
Unverified Commit 2a535136 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(mix): don’t stop parsing if a package contains “end” (#24665)

parent 897cda06
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ defmodule MyProject.MixProject do
{:jason, ">= 1.0.0"},
{:jason, "~> 1.0",
optional: true},
{:hammer_backend_redis, "~> 6.1"},
{:phoenix, "== 1.6.14"},
]
end
......
......@@ -79,6 +79,12 @@ describe('modules/manager/mix/extract', () => {
depName: 'jason',
packageName: 'jason',
},
{
currentValue: '~> 6.1',
datasource: 'hex',
depName: 'hammer_backend_redis',
packageName: 'hammer_backend_redis',
},
{
currentValue: '== 1.6.14',
currentVersion: '1.6.14',
......
......@@ -32,7 +32,7 @@ export async function extractPackageFile(
do {
depBuffer += contentArr[lineNumber] + '\n';
lineNumber += 1;
} while (!contentArr[lineNumber].includes('end'));
} while (contentArr[lineNumber].trim() !== 'end');
let depMatchGroups = depMatchRegExp.exec(depBuffer)?.groups;
while (depMatchGroups) {
const { app, requirement, opts } = depMatchGroups;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment