File: fix-register-paths.patch

package info (click to toggle)
node-tape 4.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680 kB
  • sloc: javascript: 3,824; makefile: 12; sh: 1
file content (19 lines) | stat: -rw-r--r-- 510 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: fix register paths
Author: Xavier Guimard <yadd@debian.org>
Forwarded: no
Last-Update: 2020-12-16

--- a/bin/tape
+++ b/bin/tape
@@ -22,7 +22,11 @@
         /* This check ensures we ignore `-r ""`, trailing `-r`, or
          * other silly things the user might (inadvertently) be doing.
          */
+        try {
         require(resolveModule(module, { basedir: cwd }));
+        } catch(e) {
+        require(resolveModule(module, { basedir: '/usr/share/nodejs' }));
+        }
     }
 });