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

bin/mocha and bin/_mocha have no exe permission in 6.1.x #3867

Closed
4 tasks done
Flarna opened this issue Apr 8, 2019 · 11 comments
Closed
4 tasks done

bin/mocha and bin/_mocha have no exe permission in 6.1.x #3867

Flarna opened this issue Apr 8, 2019 · 11 comments
Assignees
Labels
type: bug a defect, confirmed by a maintainer

Comments

@Flarna
Copy link

Flarna commented Apr 8, 2019

Prerequisites

  • Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
  • Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
  • 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
  • Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend that you not install Mocha globally.

Description

It seems the the files bin/mocha and bin/_mocha have no exe permissions in 6.1.0 and 6.1.1. If I do an npm install --no-bin-links and try ./node_modules/mocha/bin/_mocha (or mocha) I get Permission denied in linux.

At least in 6.0.2 these files had rwx permissions.

Steps to Reproduce

Linux environment needed
npm install --no-bin-links
./node_modules/mocha/bin/_mocha or
./node_modules/mocha/bin/mocha

Expected behavior: [What you expect to happen]
file is executable and actually node ./node_modules/mocha/bin/_mocha get's executed.

Actual behavior: [What actually happens]

File is not executable and therefore Permission denied happens.

Reproduces how often: [What percentage of the time does it reproduce?] 100%

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: 6.1.1
  • The output of node --version: 10.15.3
  • Your operating system
    • name and version: Linux Ubuntu 18.04
    • architecture (32 or 64-bit): 64
  • Your shell (e.g., bash, zsh, PowerShell, cmd): bash
  • Your browser and version (if running browser tests): -
  • Any third-party Mocha-related modules (and their versions): -
  • Any code transpiler (e.g., TypeScript, CoffeeScript, Babel) being used (and its version): -

Additional Information

@boneskull boneskull added type: bug a defect, confirmed by a maintainer and removed unconfirmed-bug labels Apr 8, 2019
@boneskull boneskull assigned boneskull and juergba and unassigned boneskull Apr 8, 2019
@boneskull
Copy link
Member

@juergba I think you might need to fix this on your side if you're going to be publishing. I've re-published to work around the issue, but we need to ensure that the file modes are set properly when publishing from windows.

This is a Git issue. When you cloned, it's likely the permissions for bin/mocha, bin/_mocha and lib/cli/cli.js were lost. These URLs might help...

@boneskull
Copy link
Member

Also, WSL or Git-for-Windows' cygwin thing might help? not sure.

@boneskull
Copy link
Member

@Flarna This has been (temporarily) fixed in v6.1.2:

image

@boneskull
Copy link
Member

whoa 1985? wtf

@plroebuck
Copy link
Contributor

$ touch 201902081301 bin/mocha
$ touch 201811291355 bin/_mocha bin/options.js

@plroebuck
Copy link
Contributor

plroebuck commented Apr 8, 2019

The "npm" registry needs work...
We need to unpublish both mocha-6.1.0 and 6.1.1; don't need users downloading either of these.
Unpublishing must occur within 72 hours!

Further, mocha@next is somehow set to "6.0.2" -- "6.1.3" perhaps?

@plroebuck
Copy link
Contributor

If using Windows, use this to prevent file permission changes to UN*X scripts:

C:> git config --local core.fileMode false

@Flarna
Copy link
Author

Flarna commented Apr 8, 2019

Thanks!

@Flarna Flarna closed this as completed Apr 8, 2019
@plroebuck
Copy link
Contributor

@juergba, note the npm issues!

@cspotcode
Copy link
Contributor

Related:
npm/npm#16645

IMO this is an npm issue that's never been fixed.

@boneskull
Copy link
Member

see also isaacs/node-tar#210 which may be where the fix needs to live

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

5 participants