1616var mFS = require ( "fs" ) ;
1717var mCrypto = require ( "crypto" ) ;
1818var mHTTP = require ( "http" ) ;
19+ var mColors = require ( "colors/safe" ) ;
1920
2021
2122
@@ -39,7 +40,7 @@ var BINARY =
3940
4041var SOURCE = REMOTE + process . env . npm_package_version + "/" + BINARY ;
4142var SIGS = REMOTE + process . env . npm_package_version + "/signatures.txt" ;
42- var TARGET = "./Library /" + BINARY ;
43+ var TARGET = "./lib /" + BINARY ;
4344
4445////////////////////////////////////////////////////////////////////////////////
4546/// Fingerprint: ssh-rsa 4096 25:9D:39:06:78:19:07:7B:1C:85:31:6E:D1:FA:9B:EA
@@ -75,11 +76,13 @@ var target = mFS.createWriteStream (TARGET);
7576
7677var genericFailure = function ( details )
7778{
78- console . error
79- ( "ERROR: robot-js binaries failed to install. " +
80- "You will need to install them manually, see " +
81- "http://getrobot.net/docs/node.html for more " +
82- "information. Details: " + details ) ;
79+ console . warn ( mColors . yellow . bold (
80+ "WARNING: robot-js precompiled binaries could " +
81+ "not be downloaded, an attempt to compile them" +
82+ " manually will be made. For more information," +
83+ " please visit http://getrobot.net/docs/node.html." +
84+ " Details: " + details
85+ ) ) ;
8386
8487 try
8588 {
@@ -95,22 +98,21 @@ var genericFailure = function (details)
9598
9699var verifyFailure = function ( details )
97100{
98- console . error
99- ( "ERROR: robot-js binaries could not be verified. " +
100- "This could be a result of a man-in-the-middle " +
101- "attack. If you want to continue anyway, use the " +
102- "following command to disable verification: 'npm " +
103- "config set robot-js:verify false'. Details: " +
104- details ) ;
101+ console . error ( mColors . red . bold (
102+ "ERROR: robot-js precompiled binaries could not " +
103+ "be verified. This could be a result of a man-in" +
104+ "-the-middle attack. If you want to continue " +
105+ "anyway, use the following command to disable" +
106+ " verification: 'npm config set robot-js:verify " +
107+ "false'. Details: " + details
108+ ) ) ;
105109
106110 try
107111 {
108112 // Delete target binary
109113 mFS . unlinkSync ( TARGET ) ;
110114
111115 } catch ( e ) { }
112-
113- process . exitCode = 1 ;
114116} ;
115117
116118////////////////////////////////////////////////////////////////////////////////
0 commit comments