Skip to content

Commit 290613d

Browse files
authored
Better CMAKE_PREFIX_PATH error (#102)
1 parent 4564798 commit 290613d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/ros_msg_utils/lib/message_cache.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const fs = require('fs');
2121
const path = require('path');
2222

2323
const CMAKE_PREFIX_PATH = process.env.CMAKE_PREFIX_PATH;
24+
if (!CMAKE_PREFIX_PATH) {
25+
throw new Error('Unable to find CMAKE_PREFIX_PATH environment variable. Did you source setup.bash?')
26+
}
2427
const cmakePaths = CMAKE_PREFIX_PATH.split(path.delimiter);
2528
const jsMsgPath = path.join('share', 'gennodejs', 'ros');
2629

0 commit comments

Comments
 (0)