Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail #929

Closed
guimard opened this issue Jan 17, 2019 · 6 comments
Closed

Build fail #929

guimard opened this issue Jan 17, 2019 · 6 comments
Labels
fix Bug/defect, or a fix for such a problem medium priority needs feedback

Comments

@guimard
Copy link

guimard commented Jan 17, 2019

Node version (or tell us if you're using electron or some other framework):

10.15

ShellJS version (the most recent version/Github branch you see the bug on):

0.8.3

Operating system:

Linux Debian unstable

Description of the bug:

Test fails when launching ava test/*.js

  541 passed
  5 failed

  exec › set maxBuffer (very small)
  /home/xavier/dev/debian/packages/node-shelljs/test/exec.js:137

   136:   shell.exec('echo 1234567890', { maxBuffer: 6 });
   137:   t.truthy(shell.error());                        
   138: });                                               

  Value is not truthy:

  null



  exec › set timeout option
  /home/xavier/dev/debian/packages/node-shelljs/src/exec.js:89

   88:   } else {                                              
   89:     stdout = fs.readFileSync(stdoutFile, opts.encoding);
   90:     stderr = fs.readFileSync(stderrFile, opts.encoding);

  Error thrown in test:

  ShellJSInternalError (Error) {
    code: 'ENOENT',
    errno: -2,
    path: '/tmp/shelljs_4d132e669300c1875c30',
    syscall: 'open',
    message: 'ENOENT: no such file or directory, open \'/tmp/shelljs_4d132e669300c1875c30\'',
  }

  execSync (src/exec.js:89:17)
  Object._exec (src/exec.js:205:12)
  Object.exec (src/common.js:335:23)
  Test.t [as fn] (test/exec.js:144:9)



  exec › command that fails
  /home/xavier/dev/debian/packages/node-shelljs/test/exec.js:232

   231:   shell.exec('shx cp onlyOneCpArgument.txt', { silent: true }, (code, stdout, stderr) => {
   232:     t.is(code, 1);                                                                        
   233:     t.is(stdout, '');                                                                     

  Difference:

  - 127
  + 1



  pipe › Synchronous exec
  /home/xavier/dev/debian/packages/node-shelljs/test/pipe.js:64

   63:   const result = shell.cat('test/resources/grep/file').exec('shx grep "alpha*beta"');
   64:   t.falsy(shell.error());                                                            
   65:   t.is(result.toString(), 'alphaaaaaaabeta\nalphbeta\n');                            

  Value is not falsy:

  'exec: '



  pipe › Asynchronous exec
  /home/xavier/dev/debian/packages/node-shelljs/test/pipe.js:70

   69:   shell.cat('test/resources/grep/file').exec('shx grep "alpha*beta"', (code, stdout) => {
   70:     t.is(code, 0);                                                                       
   71:     t.is(stdout, 'alphaaaaaaabeta\nalphbeta\n');                                         

  Difference:

  - 127
  + 0
@nfischer nfischer added fix Bug/defect, or a fix for such a problem medium priority labels Mar 9, 2019
@nfischer
Copy link
Member

nfischer commented Mar 9, 2019

Thanks for the report. This is something we should definitely look into.

I can repro a couple failures on my debian box (I think they're related to the default chmod value for the system). I regularly run tests on my ubuntu box without issue.

Could you try on a variety of node versions and let me know which failures you get on each?

@nfischer
Copy link
Member

nfischer commented Mar 9, 2019

Also, by 0.8.3, I assume you mean the latest master branch. Correct me if I'm mistaken.

@guimard
Copy link
Author

guimard commented Mar 9, 2019

@nfischer: 0.8.3 = version published on https://www.npmjs.com/package/shelljs

@nfischer
Copy link
Member

We don't ship our tests to npm. I thought this was a complaint our tests didn't work.

Please provide exact commands for how you're downloading shelljs and running tests. Or, explain the real issue if I've misunderstood.

@guimard
Copy link
Author

guimard commented Mar 10, 2019

This gives : logs.txt

@nfischer
Copy link
Member

Why are you running tests from the 0.8.3 tag? Can you run on master instead?

The logs in #929 (comment) don't match the logs from the initial report. The logs in the comment are for #915, which we fixed after v0.8.3 branched.

It sounds like there's nothing to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug/defect, or a fix for such a problem medium priority needs feedback
Projects
None yet
Development

No branches or pull requests

2 participants