Skip to content

Commit

Permalink
Added options expansion to AddLines configurator
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Aug 10, 2023
1 parent b9ff2a4 commit 1146790
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Configurator/AddLinesConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function executeConfigure(Recipe $recipe, $config): void
}
$content = $patch['content'];

$file = $this->path->concatenate([$this->options->get('root-dir'), $patch['file']]);
$file = $this->path->concatenate([$this->options->get('root-dir'), $this->options->expandTargetDir($patch['file'])]);
$warnIfMissing = isset($patch['warn_if_missing']) && $patch['warn_if_missing'];
if (!is_file($file)) {
$this->write([
Expand Down Expand Up @@ -147,7 +147,7 @@ public function executeUnconfigure(Recipe $recipe, $config): void
// Ignore "requires": the target packages may have just become uninstalled.
// Checking for a "content" match is enough.

$file = $this->path->concatenate([$this->options->get('root-dir'), $patch['file']]);
$file = $this->path->concatenate([$this->options->get('root-dir'), $this->options->expandTargetDir($patch['file'])]);
if (!is_file($file)) {
continue;
}
Expand Down

0 comments on commit 1146790

Please sign in to comment.