File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,21 @@ const binaryStagingInfoFile = binaryStagingFile + '-buildinfo.txt';
41
41
// Build Metadata
42
42
const buildDate = new Date ( ) ;
43
43
const nodeVersion = process . version ;
44
- const njsGitSha = execSync ( 'git --git-dir=./.git rev-parse --verify HEAD' ) . toString ( ) . replace ( / [ \n \r ] / , '' ) ;
45
- const odpiGitSha = execSync ( 'git --git-dir=./odpi/.git rev-parse --verify HEAD' ) . toString ( ) . replace ( / [ \n \r ] / , '' ) ;
44
+
45
+ let njsGitSha ;
46
+ try {
47
+ njsGitSha = execSync ( 'git --git-dir=./.git rev-parse --verify HEAD' ) . toString ( ) . replace ( / [ \n \r ] / , '' ) ;
48
+ } catch ( e ) {
49
+ njsGitSha = 'unknown NJS SHA' ;
50
+ }
51
+
52
+ let odpiGitSha ;
53
+ try {
54
+ odpiGitSha = execSync ( 'git --git-dir=./odpi/.git rev-parse --verify HEAD' ) . toString ( ) . replace ( / [ \n \r ] / , '' ) ;
55
+ } catch ( er ) {
56
+ odpiGitSha = 'unknown ODPI-C SHA' ;
57
+ }
58
+
46
59
const buildInfo = nodbUtil . BINARY_FILE + ' ' + nodeVersion + ' ' + njsGitSha + ' ' + odpiGitSha + ' ' + buildDate . toUTCString ( ) ;
47
60
48
61
// Build a binary for the current version of Node.js and move it to the Staging directory
You can’t perform that action at this time.
0 commit comments