Skip to content

Commit

Permalink
Fixed situation, when property used more than once in postinstall hook
Browse files Browse the repository at this point in the history
When we use {{property}} in post-install, Debian installation substitutes only the first entrance of the property in the hooks.

The proposed path fixes this.
  • Loading branch information
rssh authored and arlac77 committed Jun 28, 2024
1 parent 55a5b5d commit 38f0734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/output/debian.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export class DEBIAN extends Packager {
if (name) {
yield new StringContentEntry(
name,
f.body.replace(
/\{\{(\w+)\}\}/m,
f.body.replaceAll(
/\{\{(\w+)\}\}/mg,
(match, key, offset, string) =>
properties[key] || "{{" + key + "}}"
)
Expand Down

0 comments on commit 38f0734

Please sign in to comment.