Ind.ie is now Small Technology Foundation.
Commit e1124eb2 authored by Aral Balkan's avatar Aral Balkan

Auto update check no longer blocks main thread

parent 6cac104e
......@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## Unreleased
## [12.10.2] - 2019-11-02
### Fixed
- Auto update check no longer blocks main thread.
## [12.10.1] - 2019-11-02
### Fixed
......
......@@ -431,15 +431,16 @@ class Site {
if (process.env.NODE_ENV === 'production') {
function checkForUpdates () {
console.log(' 🛰 Running auto-update')
console.log(' 🛰 Running auto update check')
const options = {env: process.env, stdio: 'inherit'}
try {
childProcess.execSync('site update', options)
} catch (error) {
console.log(' 😱 Error: Could not check for updates.')
console.log(error)
}
childProcess.exec('site update', options, (error, stdout, stderr) => {
if (error !== null) {
console.log(' 😱 Error: Could not check for updates.')
} else {
console.log(stdout)
}
})
}
console.log(' ⏰ Setting up auto-update check interval.')
......
{
"name": "@small-tech/site.js",
"version": "12.10.1",
"version": "12.10.2",
"description": "Develop, test, and deploy your secure static or dynamic personal web site with zero configuration.",
"main": "index.js",
"bin": "bin/site.js",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment