[Pkg-javascript-commits] [node-tap] 01/01: Fail missing nyc gracefully (Closes: #844998)

Jérémy Lal kapouer at moszumanska.debian.org
Sat Nov 19 13:35:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-tap.

commit ef85f6ab61833fc9f2b596bdccc37144e66850e9
Author: Jérémy Lal <kapouer at melix.org>
Date:   Sat Nov 19 14:35:01 2016 +0100

    Fail missing nyc gracefully (Closes: #844998)
---
 debian/patches/use_available_modules.patch | 36 +++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/debian/patches/use_available_modules.patch b/debian/patches/use_available_modules.patch
index 79aa63c..37371e4 100644
--- a/debian/patches/use_available_modules.patch
+++ b/debian/patches/use_available_modules.patch
@@ -76,7 +76,33 @@ Last-Update: 2014-10-20
  
  main()
  
-@@ -397,7 +406,7 @@
+@@ -85,7 +94,11 @@
+ 
+   if ((options.coverageReport || options.checkCoverage) &&
+       options.files.length === 0) {
+-    runCoverageReport(options)
++    try {
++      runCoverageReport(options)
++    } catch(ex) {
++      console.warn("Code coverage is disabled because some modules are missing");
++    }
+     return
+   }
+ 
+@@ -107,7 +120,11 @@
+ 
+   /* istanbul ignore if */
+   if (options.coverage && !global.__coverage__) {
+-    respawnWithCoverage(options)
++    try {
++      respawnWithCoverage(options)
++    } catch(ex) {
++      console.warn("Code coverage is disabled because some modules are missing");
++    }
+     return
+   }
+ 
+@@ -397,7 +414,7 @@
  function respawnWithCoverage (options) {
    // console.error('respawn with coverage')
    // Re-spawn with coverage
@@ -85,7 +111,7 @@ Last-Update: 2014-10-20
      '--silent',
      options.nycArgs,
      '--',
-@@ -479,7 +488,7 @@
+@@ -479,7 +496,7 @@
      }
    }
  
@@ -94,7 +120,7 @@ Last-Update: 2014-10-20
    // console.error('run coverage report', args)
  
    var child
-@@ -493,7 +502,7 @@
+@@ -493,7 +510,7 @@
      child = fg(node, args)
      if (options.coverageReport === 'lcov' && options.browser) {
        child.on('exit', function () {
@@ -103,7 +129,7 @@ Last-Update: 2014-10-20
        })
      }
    }
-@@ -533,7 +542,7 @@
+@@ -533,7 +550,7 @@
  }
  
  function runCoverageCheck (options, code, signal) {
@@ -112,7 +138,7 @@ Last-Update: 2014-10-20
  
    var child = fg(node, args)
    child.removeAllListeners('close')
-@@ -549,7 +558,7 @@
+@@ -549,7 +566,7 @@
  }
  
  function nycHelp () {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git



More information about the Pkg-javascript-commits mailing list