diff --git a/src/mod/applications/mod_mongo/Makefile b/src/mod/applications/mod_mongo/Makefile index cdab0466be..9ce16b1171 100644 --- a/src/mod/applications/mod_mongo/Makefile +++ b/src/mod/applications/mod_mongo/Makefile @@ -25,8 +25,8 @@ $(MONGO_CXX_DRIVER_SRC): $(LIBMONGOCLIENT_A): $(MONGO_CXX_DRIVER_SRC) (cd $(MONGO_CXX_DRIVER_SRC) && \ - sed -i SConstruct -e "s/Environment()/Environment(ENV = {'PATH' : os.environ['PATH'],'CFLAGS' : os.environ['CFLAGS'],'CXXFLAGS' : os.environ['CXXFLAGS']})/" && \ - echo "env.Append(PATH=os.environ['PATH'])" >> SConstruct && \ + sed -i SConstruct -e "s|Environment()|Environment(ENV = {'PATH' : os.environ.get('PATH','/bin:/usr/bin'),'CFLAGS' : os.environ.get('CFLAGS',''),'CXXFLAGS' : os.environ.get('CXXFLAGS','')})|" && \ + echo "env.Append(PATH=os.environ.get('PATH','/bin:/usr/bin'))" >> SConstruct && \ scons) $(TOUCH_TARGET)