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
Flarna opened this issue Apr 8, 2019 · 11 comments

Comments

@Flarna
Copy link

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

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

@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

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

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

@boneskull

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

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

image

@boneskull

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

whoa 1985? wtf

@plroebuck

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

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

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

This comment has been minimized.

Copy link
Author

commented Apr 8, 2019

Thanks!

@Flarna Flarna closed this Apr 8, 2019
@plroebuck

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

@juergba, note the npm issues!

@cspotcode

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

Related:
npm/npm#16645

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

@boneskull

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

see also npm/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
Projects
None yet
5 participants
You can’t perform that action at this time.