diff --git a/package.json b/package.json index 354d219..58efc1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sinclair/hammer", - "version": "0.15.5", + "version": "0.15.6", "description": "Build Tool for Browser and Node Applications", "author": "sinclairzx81", "keywords": [ diff --git a/src/index.ts b/src/index.ts index 0d48529..7d71343 100644 --- a/src/index.ts +++ b/src/index.ts @@ -204,7 +204,11 @@ class Hammer implements Dispose { const package_json = JSON.parse(contents) return package_json.version } catch (error) { - console.log(error.message) + if(error instanceof Error) { + console.log(error.message) + } else { + console.log(error) + } return 'Unknown' } } diff --git a/src/run/run.ts b/src/run/run.ts index 6df8c36..c6ddaa5 100644 --- a/src/run/run.ts +++ b/src/run/run.ts @@ -37,10 +37,10 @@ import * as path from 'path' // ---------------------------------------------------------------------- function start(command: string): () => Promise { - const [gray, esc] = ['\x1b[30m', '\x1b[0m'] - console.log(`${gray}[run]${esc}`) + const [blue, esc] = ['\x1b[36m', '\x1b[0m'] + console.log(`${blue}[run]${esc}`) const s = new Shell(command, 'inherit') - const p = s.wait().then(() => console.log(`${gray}[end]${esc}`)) + const p = s.wait().then(() => console.log(`${blue}[end]${esc}`)) return async () => { s.dispose() await p