From 88b1ac9e42233568d3070d0bb148af4065f379ca Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Wed, 21 Sep 2011 15:16:56 +0200 Subject: [PATCH] ENH: correct error if mpdulePath isnot set but env var exists --- .../CommandLine/otbWrapperCommandLineLauncher.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index 3a928084ad..90aba96d37 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -105,10 +105,13 @@ CommandLineLauncher::Load() return false; } - if( this->LoadPath() == false ) + if( m_Parser->IsAttributExists(m_Parser->GetModulePathKey(), m_Expression) ) { - std::cerr << "ERROR: At least one specifed path within \""<< m_Parser->GetAttributAsString(m_Parser->GetModulePathKey(), m_Expression)<<"\" is invalid or doesn't exist..." <<std::endl; - return false; + if( this->LoadPath() == false ) + { + std::cerr << "ERROR: At least one specifed path within \""<< m_Parser->GetAttributAsString(m_Parser->GetModulePathKey(), m_Expression)<<"\" is invalid or doesn't exist..." <<std::endl; + return false; + } } this->LoadApplication(); -- GitLab