You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2017/01/12 15:43:21 UTC
nifi-minifi-cpp git commit: MINIFI-180
Repository: nifi-minifi-cpp
Updated Branches:
refs/heads/master ff7aa7fc3 -> 6b317fb4f
MINIFI-180
Duplicate Variable causes MINIFI_HOME to be NULL if ENV variable is not
present
This closes #36.
Signed-off-by: Aldrin Piri <al...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/6b317fb4
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/6b317fb4
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/6b317fb4
Branch: refs/heads/master
Commit: 6b317fb4f2ebbeec91fa9930c479c2d929982f42
Parents: ff7aa7f
Author: Jeremy Dyer <jd...@gmail.com>
Authored: Mon Jan 2 17:00:31 2017 -0500
Committer: Aldrin Piri <al...@apache.org>
Committed: Thu Jan 12 10:43:01 2017 -0500
----------------------------------------------------------------------
main/MiNiFiMain.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/6b317fb4/main/MiNiFiMain.cpp
----------------------------------------------------------------------
diff --git a/main/MiNiFiMain.cpp b/main/MiNiFiMain.cpp
index 11e8f00..020fbbd 100644
--- a/main/MiNiFiMain.cpp
+++ b/main/MiNiFiMain.cpp
@@ -80,8 +80,9 @@ int main(int argc, char **argv)
char *path = NULL;
char full_path[PATH_MAX];
path = realpath(argv[0], full_path);
- std::string minifiHome(path);
- minifiHome = minifiHome.substr(0, minifiHome.find_last_of("/\\"));
+ std::string minifiHomePath(path);
+ minifiHomePath = minifiHomePath.substr(0, minifiHomePath.find_last_of("/\\")); //Remove /minifi from path
+ minifiHome = minifiHomePath.substr(0, minifiHomePath.find_last_of("/\\")); //Remove /bin from path
}
if (signal(SIGINT, sigHandler) == SIG_ERR || signal(SIGTERM, sigHandler) == SIG_ERR || signal(SIGPIPE, SIG_IGN) == SIG_ERR)