• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli / #1428
97%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 04 Mar 2021 09:09PM UTC
Jobs 1
Files 117
Run time 29s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#1428

push

ruyadorno
Get correct npm prefix on all Windows unix shells

1. Set the shebang to /usr/bin/env bash instead of /bin/sh (which might
   be dash or some other shell)
2. Use Unix-style line endings, not Windows-style (Cygwin accepts
   either, but mingw bash sometimes objects, and WSL bash always does)
3. Test against paths using wslpath if available, but still pass win32
   paths to node.exe, since it is a Windows binary that only knows how
   to handle Windows paths.

This makes npm as installed by the Node.js Windows MSI installer behave
properly under WSL, Cygwin, MINGW Git Bash, and the internal MINGW Git
Bash when posix CLI utilities are exposed to the cmd.exe shell.

The test is not quite as comprehensive as I'd like.  It runs on the
various Windows bash implementations if they are found in their expected
locations, skipping any that are not installed.  Short of shipping
mingw, cygwin, and wsl as test fixtures, I'm not sure how we could do
much better, however.  At least, we can use this test to assist debug
and catch issues on Windows machines (ours or users who report
problems).

PR-URL: https://github.com/npm/cli/pull/2789
Credit: @isaacs
Close: #2789
Reviewed-by: @nlf

2857 of 2948 branches covered (96.91%)

Branch coverage included in aggregate %.

4761 of 4884 relevant lines covered (97.48%)

18.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1428.1 04 Mar 2021 09:09PM UTC 0
97.27
Source Files on build #1428
  • Tree
  • List 117
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • e69be2ac on github
  • Prev Build on release/v7.6.1
  • Next Build on release/v7.6.1
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc