Skip to content

[BUG] npm outdated no longer exits with code 1 if outdated #2556

@gfyoung

Description

@gfyoung

Current Behavior:

Exits with code 0.

Expected Behavior:

Exits with code 1.

Steps To Reproduce:

#!/usr/bin/env bash

FOLDER=`mktemp -d`

echo $FOLDER

cd $FOLDER

# https://www.npmjs.com/package/@npmcli/arborist
npm install @npmcli/[email protected] --save

npm outdated

echo $?

This echos 0 and not 1.

Environment:

OS: MacOS Catalina
Node: v15.7.0
npm: 7.4.3

When I run the same script with:

OS: MacOS Catalina
Node: v13.0.1
npm: 6.14.0

I get the output of 1 at the end as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions