From a36d2502d76d593ced3fe43622b91f85003f239b Mon Sep 17 00:00:00 2001 From: "yons.kim" Date: Thu, 14 Jan 2016 11:09:58 +0900 Subject: [PATCH] Fix bug that writes wrong file permission Should use mode 'Number' with the prefix '0o'such as 666 -> 0o666 when fs module is used Change-Id: Iea514c328993b09b77e9533557c7a7c110fae2c6 --- cli/lib/create.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/lib/create.js b/cli/lib/create.js index e557691..db422fb 100755 --- a/cli/lib/create.js +++ b/cli/lib/create.js @@ -167,7 +167,7 @@ // Checking whether the 'appId' exists var app = parser.getAppSync(appId); if (app) { - throw new JsnError(appId + " already exists"); + throw new JsnError(appId + ' already exists'); } }) @@ -195,7 +195,7 @@ parser.get('package').pkg_id + '.' + appId); return Q.denodeify(fs.writeFile)(binPath, binContent, - { mode: 775 }); + { mode: 0o775 }); }); }) @@ -222,7 +222,7 @@ path.join(path.join(parser.get('exec_path'), 'res', appId), 'index.js'); return Q.denodeify(fs.writeFile)(indexPath, indexContent, - { mode: 775 }); + { mode: 0o775 }); }); }) @@ -232,4 +232,4 @@ }); } // createApp } // create -}()); \ No newline at end of file +}()); -- 2.7.4