Coder Social home page Coder Social logo

dotf's People

Contributors

bcoe avatar dependabot[bot] avatar grant avatar popgoesthewza avatar prprhyt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

prprhyt bcoe

dotf's Issues

dot file permission is incorrect.(---x-wx--T)

npm test is failed.

npm test

> [email protected] test /Users/prprhyt/gitdir/dotf
> ava


  2 passed
  2 failed

  read

  Rejected promise returned by test. Reason:

  Error {
    code: 'EACCES',
    errno: -13,
    path: '/Users/prprhyt/.myrc3',
    syscall: 'open',
    message: 'EACCES: permission denied, open \'/Users/prprhyt/.myrc3\'',
  }



  write
  /Users/prprhyt/gitdir/dotf/test.js:19

   18:       parseInt(777, 8)).toString(8)) {
   19:     t.fail();                         
   20:   }                                   

  Test failed via `t.fail()`
npm ERR! Test failed.  See above for more details.

It looks like to set wrong permission in 87d53f7#diff-168726dbe96b3ce427e7fedce31bb0bcR36.

fs.chmodSync(fullpath, 600);

It seems to be incorrect.
I think 0600 is correct.
fs.chmodSync's 2nd args is derived from C lang chmod function in sys/stat.h.

int chmod(const char *pathname, mode_t mode);

See:

dot file permission is unsafe. (-rw-r--r--)

I expect to limit dot file permissions to only the owner after this file was created.
See google/clasp#387 .

Expected Behavior

$ ls -g .clasprc.json 
-rw-------  1 staff  583 11 11 23:30 .clasprc.json

Actual Behavior

$ ls -g .clasprc.json 
-rw-r--r--  1 staff  583 11 11 23:30 .clasprc.json

test: Make tests run faster

Test suite is slow due to too many os/node version combinations.

Make this faster by reducing number of versions:

Screen Shot 2019-05-24 at 10 18 38

Failed test. Error message: 'ENOENT: no such file open .myrc

$ git clone https://github.com/grant/dotf.git
$ cd dotf
$ npm test

> [email protected] test /Users/prprhyt/gitdir/dotf
> ava


  3 passed
  1 failed

  read

  Rejected promise returned by test. Reason:

  Error {
    code: 'ENOENT',
    errno: -2,
    path: '/Users/prprhyt/.myrc',
    syscall: 'open',
    message: 'ENOENT: no such file or directory, open \'/Users/prprhyt/.myrc\'',
  }
npm ERR! Test failed.  See above for more details.

Ava test code run in parallel and test cases access same file(.myrc, myignore).
I think that this is the cause of that error.

I think to solve this problem by changing filename each test or using test.serial.

Specifications

  • Node version (node -v): v10.8.0
  • OS (Mac/Linux/Windows): macOS High Sierra 10.13.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.