Skip to content

Commit

Permalink
Match full string when discovering docker volumes
Browse files Browse the repository at this point in the history
When non-balena managed docker volumes are present that partially match
the appId_volumeName regular expression, the partial name will be
used incorrectly as the full name by the supervisor.

Change-type: patch
Contributed-by: @thomaswiese0
Closes: #2207
  • Loading branch information
pipex committed Oct 23, 2023
1 parent 6d2470a commit cedffa2
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 cedffa2

Please sign in to comment.