Permalink
Browse files

Create folder before init logfile

  • Loading branch information...
1 parent 4d1801b commit 7860edd94969cc4346fa5ef0d89f87f50e370721 @mariogrip mariogrip committed Sep 24, 2017
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/utils.js
View
@@ -99,6 +99,9 @@ var getUbportDir = () => {
return path.join(process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME + '/.cache'), "ubports/")
}
+if (!fs.existsSync(getUbportDir())) {
+ mkdirp.sync(getUbportDir());
+}
winston.add(winston.transports.File, { filename: getUbportDir()+'ubports-installer.log' });
winston.level = 'debug';

0 comments on commit 7860edd

Please sign in to comment.