From 86a5075f8aa1f10da1de58c3ed01db165be8c06b Mon Sep 17 00:00:00 2001 From: Felipe Lalanne <1822826+pipex@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:49:55 -0300 Subject: [PATCH] Fix volume regex to match full volume name Previous regex would recognize non balena volumes with partial matches. Closes: #2207 --- src/compose/volume.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compose/volume.ts b/src/compose/volume.ts index 976eb50771..da1392f3db 100644 --- a/src/compose/volume.ts +++ b/src/compose/volume.ts @@ -126,7 +126,7 @@ export class Volume { name: string; appId: number; } { - const match = name.match(/(\d+)_(\S+)/); + const match = name.match(/^(\d+)_(\S+)$/); if (match == null) { throw new InternalInconsistencyError( `Could not detect volume data from docker name: ${name}`,