Skip to content

Commit

Permalink
fixed invalid path to wp-cli issue
Browse files Browse the repository at this point in the history
  • Loading branch information
azeemhassni committed May 22, 2017
1 parent 9cff816 commit f6c85a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/WPCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ public function __construct(InputInterface $input, OutputInterface $output)
$this->input = $input;
$this->output = $output;

// try from local vendor/bin
$this->wp = dirname(__DIR__) . '/vendor/bin/wp';

if (!file_exists($this->wp)) {
// load it from global vendor/bin (../../../bin/wp )
$this->wp = dirname(dirname(dirname(__DIR__))) . '/bin/wp';
}

}

/**
Expand Down

0 comments on commit f6c85a4

Please sign in to comment.