Skip to content

Commit 2470b1c

Browse files
committed
Fix var name
1 parent 278dda9 commit 2470b1c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Command/DeployRsyncCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8080
if ($ignoreFile) {
8181
$command[] = '--exclude-from='.$ignoreFile;
8282
}
83-
if (preg_match(self::TARGET_FILE_REGEX, $environment['target'], $targetPats)) {
83+
if (preg_match(self::TARGET_FILE_REGEX, $environment['target'], $targetParts)) {
8484
$command[] = $this->getDirPath($this->projetDir);
85-
$command[] = $this->getDirPath($targetPats['path']);
86-
} elseif (preg_match(self::TARGET_SSH_REGEX, $environment['target'], $targetPats)) {
85+
$command[] = $this->getDirPath($targetParts['path']);
86+
} elseif (preg_match(self::TARGET_SSH_REGEX, $environment['target'], $targetParts)) {
8787
$command[] = '-e';
88-
$command[] = \sprintf('ssh -p%s', ('' !== $targetPats['port']) ? $targetPats['port'] : 22);
88+
$command[] = \sprintf('ssh -p%s', ('' !== $targetParts['port']) ? $targetParts['port'] : 22);
8989
$command[] = $this->getDirPath($this->projetDir);
90-
$command[] = \sprintf('%s@%s:%s', $targetPats['username'], $targetPats['hostname'], $this->getDirPath($targetPats['path']));
90+
$command[] = \sprintf('%s@%s:%s', $targetParts['username'], $targetParts['hostname'], $this->getDirPath($targetParts['path']));
9191
} else {
9292
throw new \Exception('Invalid target');
9393
}

0 commit comments

Comments
 (0)