Skip to content

Commit

Permalink
+ detect if running inside virtualenv in BinaryPython::install
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Oct 17, 2016
1 parent 19dee2c commit 2977a70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/base/BinaryPython.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public function install()
$dest = Yii::getAlias('@root/' . $this->name, false);
passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode);
} else {
$exitcode = $this->controller->passthru('pip', ['install', '--user', $this->package]);
$user = $_SERVER['VIRTUAL_ENV'] ? '' : '--user';
$exitcode = $this->controller->passthru('pip', ['install', $user, $this->package]);
}

return $exitcode;
Expand Down

0 comments on commit 2977a70

Please sign in to comment.