Skip to content

Commit

Permalink
Finish Hotfix-3
Browse files Browse the repository at this point in the history
In a brew environment portcullis we have junctools in the bin dir but portcullis python scripts will still be in the local directory.  This change deals with that config.
  • Loading branch information
Daniel Mapleson committed Mar 19, 2018
2 parents 23c1d1d + 83953e9 commit 8e9afe0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/include/portcullis/portcullis_fs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,13 @@ class PortcullisFS {
this->scriptsDir = PORTCULLIS_SITE_PKGS;
this->scriptsDir /= string("portcullis-") + PACKAGE_VERSION + "-py" + HAVE_PYTHON + ".egg";
if (!exists(this->scriptsDir)) {
BOOST_THROW_EXCEPTION(FileSystemException() << FileSystemErrorInfo(string(
"Could not find Portcullis scripts at the expected installed location: ") + this->scriptsDir.c_str()));
// Do a check to see if we can find the local version first (possibly a brew or conda install)
this->scriptsDir = path(PORTCULLIS_SITE_PKGS).parent_path();
this->scriptsDir /= "local";
if (!exists(this->scriptsDir)) {
BOOST_THROW_EXCEPTION(FileSystemException() << FileSystemErrorInfo(string(
"Could not find Portcullis scripts at the expected installed location: ") + this->scriptsDir.c_str()));
}
}
#else
this->scriptsDir = canonicalExe.parent_path();
Expand Down

0 comments on commit 8e9afe0

Please sign in to comment.