diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index 22403e81c582..8a08b3c8cc69 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -103,7 +103,7 @@ ELSE() # get a list of rocksdb library source files # run with env -i to avoid passing variables EXECUTE_PROCESS( - COMMAND env -i CXX=${CMAKE_CXX_COMPILER} PATH="/sbin:/usr/sbin:/bin:/usr/bin" ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY} + COMMAND env -i CXX=${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR}/get_rocksdb_files.sh ${ROCKSDB_FOLLY} OUTPUT_VARIABLE SCRIPT_OUTPUT WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/storage/rocksdb/get_rocksdb_files.sh b/storage/rocksdb/get_rocksdb_files.sh index 2165dc61484f..3fcff9e64d4a 100755 --- a/storage/rocksdb/get_rocksdb_files.sh +++ b/storage/rocksdb/get_rocksdb_files.sh @@ -1,4 +1,8 @@ #!/bin/bash +if [ -z "$PATH" ]; then + export PATH="/sbin:/usr/sbin:/bin:/usr/bin" +fi + MKFILE=`mktemp` # create and run a simple makefile # include rocksdb make file relative to the path of this script