blun-king-cli 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/blun.js +2 -1
- package/package.json +1 -1
package/bin/blun.js
CHANGED
|
@@ -126,7 +126,8 @@ function checkForUpdates() {
|
|
|
126
126
|
try {
|
|
127
127
|
var currentVersion = "1.4.0";
|
|
128
128
|
try { currentVersion = require(path.join(__dirname, "..", "package.json")).version; } catch(e) {}
|
|
129
|
-
var
|
|
129
|
+
var nullDev = process.platform === "win32" ? "2>NUL" : "2>/dev/null";
|
|
130
|
+
var latest = execSync("npm view blun-king-cli version " + nullDev, { encoding: "utf8", timeout: 8000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
130
131
|
if (latest && latest !== currentVersion) {
|
|
131
132
|
console.log(C.yellow + C.bold + " " + BOX.arrow + " Update available: " + currentVersion + " → " + latest + C.reset);
|
|
132
133
|
console.log(C.yellow + " npm update -g blun-king-cli" + C.reset);
|