Skip to content

FezVrasta/which-pm-runs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

which-pm-runs-cli

Easily know which package manager is running your package.json scripts.

Usage

yarn add --dev which-pm-runs-cli
{
    "scripts": {
        "preinstall": "which-pm-runs --is yarn || echo 🛑 Yarn is required to setup this project!"
    }
}
❯ npm install
[...]
npm ERR! code ELIFECYCLE
🛑 Yarn is required to setup this project!
❯ echo $?
1

❯ yarn install
[...]
❯ echo $?
0

About

Detects what package manager executes the process from CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published