Skip to content

Commit

Permalink
fix(docker-compose): less strict replace regex
Browse files Browse the repository at this point in the history
This allows for comments in the image: line to be replaced
  • Loading branch information
rarkins committed Jan 15, 2020
1 parent eb082ea commit 114532e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/manager/docker-compose/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function updateDependency(
logger.debug(`docker-compose.updateDependency(): ${newFrom}`);
const lines = fileContent.split('\n');
const lineToChange = lines[upgrade.managerData.lineNumber];
const imageLine = new RegExp(/^(\s*image:\s*'?"?)[^\s'"]+('?"?\s*)$/);
const imageLine = new RegExp(/^(\s*image:\s*'?"?)[^\s'"]+('?"?\s*)/);
if (!lineToChange.match(imageLine)) {
logger.debug('No image line found');
return null;
Expand Down

0 comments on commit 114532e

Please sign in to comment.