126 Commits

Author SHA1 Message Date
Chulki Lee
021770b9cb Do not add the directory containing node executable
Adding the directory containing current node executable may lead to run
different executable than original PATH.
See #5876 for details
2014-08-14 13:35:39 -07:00
bcoe
df4b0e7fc1 making it so that you can pass arguments to run-scripts. 2014-07-22 17:23:32 -07:00
isaacs
bf761dddd1 Busy Spinner, no http noise
One step closer to #5213
2014-05-07 15:18:38 -07:00
Yeonghoon Park
8b5e7b6ae5 Add test for lifecycle.makeEnv() 2014-04-18 00:04:04 -04:00
Yeonghoon Park
3e03524f8a Fix lifecycle to pass Infinity for config env value 2014-04-18 00:04:03 -04:00
Raynos (Jake Verbaten)
c95cf086e5 do not log if silent 2014-04-10 10:55:43 -07:00
Robert Kowalski
80282edb6c npm-run: fix commands with whitespaces on windows
Fixes #4403
2014-01-11 12:44:24 -05:00
Quinn Slack
d7e67bf0d9 Add --ignore-scripts option.
It causes all npm commands to no longer run package.json scripts. Most notably,
`npm install --ignore-scripts` will not run preinstall and prepublish scripts.
2013-12-15 20:55:08 -05:00
Nathan Rajlich
d885f81ec6 lifecycle: proxy the child process' "signal" to npm
This way, if an `npm test` script (or any other lifecycle process) ends
up exiting because of a signal like a SIGSEGV, then npm will exit the same
way (since the `code` will be null when a signal is present), and not
obscure the signal the occurred.

For example, given this `package.json` file:

``` json
{
  "name": "sigsegv",
  "version": "0.0.0",
  "scripts": {
    "test": "node -e 'process.kill(process.pid, \"SIGSEGV\")'"
  }
}
```

Before this patch, npm would obscure the seg fault exit status:

```
$ npm test

> sigsegv@0.0.0 test /Users/nrajlich/t
> node -e 'process.kill(process.pid, "SIGSEGV")'

$ echo $?
0
```

After this patch, the proper signal is relayed to npm, and thus the shell:

```
$ node ../npm/bin/npm-cli.js test

> sigsegv@0.0.0 test /Users/nrajlich/t
> node -e 'process.kill(process.pid, "SIGSEGV")'

Segmentation fault: 11

$ echo $?
139
```
2013-11-10 12:48:29 -08:00
isaacs
5b95751baf scripts: Only run one script at a time
This prevents the output from build scripts from being comingled with
one another.
2013-10-28 11:18:41 -07:00
isaacs
e380dc5aab scripts: Avoid 'weird errors' from numeric codes
Regression introduced by transition to spawn from utils/exec.js
2013-10-23 23:09:46 -07:00
isaacs
80d2e4eb64 use 'customFds' instead of 'stdio'
For the good of 0.6
2013-04-29 08:42:19 -07:00
Robert Kowalski
8e879f558e remove exec.js, use child_process.execFile
Fixes #3312
2013-04-28 21:06:52 -07:00
isaacs
1ca96790f5 Fix #3092 Exclude readme contents from lifecycle env 2013-01-24 12:07:50 -08:00
isaacs
c716ed61d9 Set PATH in the proper order in lifecycle scripts
Fix #3063
2013-01-16 11:49:05 -08:00
isaacs
ad8e21fc9d Expose npm bin as env.npm_execpath
This also makes the peer dep tests pass on unix, since the npm bin
location is different.
2013-01-09 11:34:00 -08:00
isaacs
9c63b765a6 Expose node's execPath to scripts
Re: einaros/ws#129
2012-11-08 15:30:06 -08:00
isaacs
9e2fc4ccfd Don't put array configs in the env for scripts
This breaks tests and such, now that the CA has GlobalSign as well
2012-09-09 17:49:23 -07:00
isaacs
d20eb0fcdd Use new npmconf module 2012-08-14 19:47:43 -07:00
Nathan Rajlich
898594413b node exe dir to the PATH for lifestyle scripts
Fixes #2680.
2012-08-07 15:15:14 -07:00
einaros
cb5a9deef9 removed superfluous and erroneous node-gyp command replacement 2012-08-04 11:17:53 -07:00
isaacs
1977584a97 Replace lib/utils/output.js with console.log 2012-07-16 13:28:37 -07:00
Rod Vagg
53c7e2cc80 logstream option to replace removed logfd 2012-06-17 18:08:21 -07:00
isaacs
99110432e5 Use read-package-json dep 2012-06-11 12:06:56 -07:00
isaacs
3b1a4f0a49 Handle errors in the more modern fashion 2012-06-08 18:04:46 -07:00
isaacs
2568e40a39 Replace the log util with npmlog module
This feels so good.  lib/utils/log.js is the worst kind of
glue code that keeps the npm project from being properly
abstracted into independent pieces.

In the process, also cleaned up a lot of unproductive logging,
and made the npm-debug.log generated on errors be a bit more
easy to read.
2012-06-06 14:56:35 -07:00
isaacs
2fa94efc1d s/path.resolve/require.resolve/ 2012-05-20 00:46:56 -03:00
isaacs
e6c3e19be9 Always use the bundled node-gyp bin 2012-05-20 00:11:01 -03:00
isaacs
2605310ed2 Always favor the bundled node-gyp 2012-03-12 16:08:48 -07:00
Rod Vagg
7c689580c7 ignore logfd/outfd streams in makeEnv() 2012-02-28 18:52:59 -08:00
isaacs
21b77a4785 Fix #2123 Set path properly for lifecycle scripts on windows 2012-02-08 12:16:53 -08:00
David Trejo
cd66aab8d9 lifecycle.js: fix a brace indentation issue 2012-01-12 13:38:06 -08:00
isaacs
3f08f5b246 Don't pass false confs to child procs as 'false' string 2011-12-04 11:09:59 -08:00
isaacs
4eb8f6b7bf Avoid accidentally opening npm.js with WSH 2011-10-14 14:06:12 -07:00
isaacs
344649dd14 Merge remote branch 'deanlandolt/winbin' into winbin
Conflicts:
	lib/utils/mkdir-p.js
	lib/utils/output.js
2011-09-26 11:06:37 -07:00
isaacs
bc2258668d Properly handle \n in configs placed into the env 2011-09-15 14:28:55 -07:00
isaacs
c4b9aeb7fd handle multi-line config options 2011-09-15 13:02:22 -07:00
isaacs
60acc2aaf1 Sometimes failure is an option 2011-09-15 12:59:54 -07:00
Dean Landolt
5836d0dd6b cmd /c flag not case sensitive 2011-09-07 01:07:05 -04:00
Dean Landolt
ddb80775ca fix run-script to work with cmd.exe 2011-09-07 00:38:11 -04:00
isaacs
c53c6b8b0c Allow private per-package confs
Just prefix them with a _.  Transparent to the receiving module.
2011-08-06 20:55:26 -07:00
isaacs
645cef3e77 Put .js on filenames 2011-08-06 13:51:59 -07:00
isaacs
0ec9ab9ed2 doa bug, annoying. 2011-07-22 23:44:34 -07:00
isaacs
a0a4785c09 Close #1175 Add --production flag 2011-07-22 22:37:27 -07:00
isaacs
157fbb1030 Use asyncMap from slide module 2011-07-20 02:48:53 -07:00
isaacs
af8e6156d6 Use chain function from slide module 2011-07-20 02:43:40 -07:00
isaacs
98b6a1070a Abstract out graceful-fs 2011-07-20 01:58:33 -07:00
isaacs
732d4d0394 Dumb typo. 2011-06-29 13:13:27 -07:00
isaacs
56a6dd3ad0 Fix the FIXME in validWd 2011-06-29 12:01:42 -07:00
isaacs
baf983ba19 Close #912 Trust scripts that are run explicitly 2011-05-22 17:55:44 -07:00