Closed aharbick closed 10 years ago
P.S. OS X 10.6.8
This is what the diff looks like... https://github.com/aharbick/tower/commit/fbbcc2bb1fb28977f34898968c790fb7156b33cb
parseInt('0755', 8)
or just make it use 0755
, the same effect (Javascript supports octals without the need of extra parseInt
)
aharbick.local:~/Projects/Personal$ node -v v0.10.3 aharbick.local:~/Projects/Personal$ tower new testapp create : testapp/.gitignore create : testapp/.npmignore create : testapp/.slugignore ....
aharbick.local:~/Projects/Personal$ ls -ld testapp d-wxrw---x 21 aharbick staff 714 Apr 27 11:14 testapp aharbick.local:~/Projects/Personal$ ls -l testapp/ ls: : Permission denied
The call to fs.mkdirSync(dir, parseInt('0755')) in tower-generator/server/actions.js is essentially going to call: fs.mkdirSync(dir, 755);
losing the octal value 0755 and that seems to be the problem... If instead I just pass in an octal in node you can see the different results... aharbick.local:~/Projects/Personal$ node
aharbick.local:~/Projects/Personal/tower$ ls -ld /var/tmp/dir* d-wxrw---x 2 aharbick wheel 68 Apr 27 11:24 /var/tmp/dir1 drwxr-xr-x 2 aharbick wheel 68 Apr 27 11:24 /var/tmp/dir2 drw-rw-r-- 2 aharbick wheel 68 Apr 27 11:24 /var/tmp/dir3
Can you confirm that I'm not doing something wrong before I fork and create a pull request?