File: use-nodejs.patch

package info (click to toggle)
node-yargs 6.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 944 kB
  • ctags: 105
  • sloc: makefile: 4; sh: 2
file content (71 lines) | stat: -rw-r--r-- 2,260 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- a/test/integration.js
+++ b/test/integration.js
@@ -19,16 +19,16 @@
   })
 
   it('should run as a node script with no arguments', function (done) {
-    testArgs('node bin.js', [], done)
+    testArgs('nodejs bin.js', [], done)
   })
 
   it('should run as a node script with arguments', function (done) {
-    testArgs('node bin.js', [ 'x', 'y', 'z' ], done)
+    testArgs('nodejs bin.js', [ 'x', 'y', 'z' ], done)
   })
 
   describe('path returned by "which"', function () {
     it('should match the actual path to the script file', function (done) {
-      which('node', function (err, path) {
+      which('nodejs', function (err, path) {
         if (err) return done(err)
         testArgs(path.replace('Program Files (x86)', 'Progra~2')
                      .replace('Program Files', 'Progra~1') + ' bin.js', [], done)
@@ -36,7 +36,7 @@
     })
 
     it('should match the actual path to the script file, with arguments', function (done) {
-      which('node', function (err, path) {
+      which('nodejs', function (err, path) {
         if (err) return done(err)
         testArgs(path.replace('Program Files (x86)', 'Progra~2')
                      .replace('Program Files', 'Progra~1') + ' bin.js', [ 'q', 'r' ], done)
--- a/test/fixtures/bin.js
+++ b/test/fixtures/bin.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 var argv = require('../../index')
   .help('help')
   .completion()
--- a/test/fixtures/issue-497.js
+++ b/test/fixtures/issue-497.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 
 // pretend we are a TTY
 process.stdout.isTTY = true
--- a/test/fixtures/normal-bin.js
+++ b/test/fixtures/normal-bin.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 var argv = require('./yargs/index.js')
   .help('help')
   .version()
--- a/test/fixtures/opt-assignment-and-positional-command-arg.js
+++ b/test/fixtures/opt-assignment-and-positional-command-arg.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 require('../../index')
   .option('foo', {
     nargs: 1
--- a/test/fixtures/symlink-bin.js
+++ b/test/fixtures/symlink-bin.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env node
+#!/usr/bin/env nodejs
 var argv = require('./yargs-symlink/index.js')
   .help('help')
   .version()