Fix bug that writes wrong file permission 63/56963/2
authoryons.kim <yons.kim@samsung.com>
Thu, 14 Jan 2016 02:09:58 +0000 (11:09 +0900)
committerSeungkeun Lee <sngn.lee@samsung.com>
Thu, 14 Jan 2016 05:53:36 +0000 (21:53 -0800)
Should use mode 'Number' with the prefix '0o'such as 666 -> 0o666
when fs module is used

Change-Id: Iea514c328993b09b77e9533557c7a7c110fae2c6

cli/lib/create.js

index e557691..db422fb 100755 (executable)
         // Checking whether the 'appId' exists
         var app = parser.getAppSync(appId);
         if (app) {
-          throw new JsnError(appId + " already exists");
+          throw new JsnError(appId + ' already exists');
         }
       })
 
                                       parser.get('package').pkg_id +
                                         '.' + appId);
             return Q.denodeify(fs.writeFile)(binPath, binContent,
-                                             { mode: 775 });
+                                             { mode: 0o775 });
           });
       })
 
                 path.join(path.join(parser.get('exec_path'), 'res', appId),
                           'index.js');
             return Q.denodeify(fs.writeFile)(indexPath, indexContent,
-                                            { mode: 775 });
+                                            { mode: 0o775 });
           });
       })
 
       });
     } // createApp
   } // create
-}());
\ No newline at end of file
+}());