From 021b8130636bc0a28ffeadf865c4e46658ae73e9 Mon Sep 17 00:00:00 2001 From: Rampancy Date: Thu, 8 Nov 2018 10:25:20 -0500 Subject: [PATCH] Fixed deprecation warning [DEP0013] that throws type error in Node version 10+ --- bin/tith.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tith.js b/bin/tith.js index 3bf9b9d..6938106 100755 --- a/bin/tith.js +++ b/bin/tith.js @@ -31,7 +31,9 @@ function createTiAppFile(fromPath) { function copyFile(fromPath, toPath) { fs.readFile(fromPath, function (err, data) { - fs.writeFile(toPath, data); + fs.writeFile(toPath, data, (err) => { + if(err) throw err; + }); }); }