Skip to content

Commit

Permalink
Fix volume regex to match full volume name
Browse files Browse the repository at this point in the history
Previous regex would recognize non balena volumes with partial matches.

Closes: #2207
  • Loading branch information
pipex committed Oct 23, 2023
1 parent 6d2470a commit 86a5075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compose/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down

0 comments on commit 86a5075

Please sign in to comment.