New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

force-exit-zero

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

force-exit-zero

Force a command to exit with code 0 (success), regardless of the result. Perfect for CI pipelines.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

force-exit-zero

Force a command to exit with code 0 (success).

The Problem: Your CI fails because a linter found a warning, or a non-critical script returned exit code 1. You try adding || true but it doesn't work consistently across Windows/Linux shells.

The Solution: force-exit-zero runs your command, streams the output (colors preserved), and always reports success to the OS.

npm version size npm downloads license stars

Install

npm install force-exit-zero

Usage

In package.json scripts

{
  "scripts": {
    "lint": "eslint .",
    "lint:ci": "force-exit-zero npm run lint"
  }
}

In GitHub Actions / CI

steps:
  - run: npx force-exit-zero npm run test:flaky

CLI

$ force-exit-zero ls --unknown-flag
ls: unrecognized option '--unknown-flag'
# (The command failed, but the process exited with 0)

Why not || true?

  • || true doesn't work in standard Windows cmd.exe.
  • || true can be confusing in complex npm run chains.
  • force-exit-zero is explicit: you are intentionally suppressing the failure.

License

MIT

{ github.com/mgks }

Website Badge Sponsor Badge

Keywords

cli

FAQs

Package last updated on 28 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts