Merge pull request #1050 from balena-io/node6-types

Fix deploy action on node 6
This commit is contained in:
Alexis Svinartchouk 2018-12-14 11:37:07 +01:00 committed by GitHub
commit a66aec6965
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -196,7 +196,7 @@ function assignOutputHandlers(buildTasks: BuildTask[], logger: Logger) {
} else { } else {
task.streamHook = stream => { task.streamHook = stream => {
stream.on('data', (buf: Buffer) => { stream.on('data', (buf: Buffer) => {
const str = buf.toString().trimRight(); const str = _.trimEnd(buf.toString());
if (str !== '') { if (str !== '') {
displayBuildLog( displayBuildLog(
{ serviceName: task.serviceName, message: str }, { serviceName: task.serviceName, message: str },

View File

@ -283,5 +283,7 @@ export function exitWithExpectedError(message: string | Error): never {
} }
printErrorMessage(message); printErrorMessage(message);
return process.exit(1); process.exit(1);
// The following throw is to make tsc happy about the `never` return type.
throw new Error('exit');
} }

View File

@ -71,7 +71,7 @@
"@types/is-root": "1.0.0", "@types/is-root": "1.0.0",
"@types/lodash": "4.14.103", "@types/lodash": "4.14.103",
"@types/mkdirp": "0.5.2", "@types/mkdirp": "0.5.2",
"@types/node": "10.5.2", "@types/node": "6.14.2",
"@types/prettyjson": "0.0.28", "@types/prettyjson": "0.0.28",
"@types/raven": "2.5.1", "@types/raven": "2.5.1",
"catch-uncommitted": "^1.0.0", "catch-uncommitted": "^1.0.0",