Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Restart script always runs stop and start #1999

Closed
@gmiroshnykov

Description

As per npm help scripts:

Note: npm restart will run the stop and start scripts if no restart script is provided.

But in reality this package.json:

{
    "name": "example",
    "version": "0.0.1",
    "scripts": {
        "start": "echo 'start'",
        "stop": "echo 'stop'",
        "restart": "echo 'restart'"
    }
}

results in this behavior:

$ node -v
v0.6.6
$ npm -v
1.1.0-beta-4
$ npm restart

> [email protected] stop /tmp/example
> echo 'stop'

stop

> [email protected] restart /tmp/example
> echo 'restart'

restart

> [email protected] start /tmp/example
> echo 'start'

start

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions