Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #13 from mtdavidson/feature/resolveFailedToExecute…
Browse files Browse the repository at this point in the history
…NmapIssue

Resolve issue #11 prevent return of -1 ( 255 ) code
  • Loading branch information
willdurand committed Oct 14, 2015
2 parents 5b09456 + 90db7ad commit 0ad808a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nmap/Nmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(ProcessExecutor $executor = null, $outputFile = null
$this->executable = $executable;

// If executor returns anything else than 0 (success exit code), throw an exeption since $executable is not executable.
if ($this->executor->execute($this->executable) !== 0) {
if ($this->executor->execute($this->executable.' -h') !== 0) {
throw new \InvalidArgumentException(sprintf('`%s` is not executable.', $this->executable));
}
}
Expand Down

0 comments on commit 0ad808a

Please sign in to comment.