inside-ci/README.md

26 lines
580 B
Markdown
Raw Permalink Normal View History

2024-11-18 23:24:04 +00:00
# inside-ci
Returns true if code is running inside CI, otherwise false.
2024-11-18 23:57:35 +00:00
This also works as a drop-in replacement for anyone currently using `is-ci`.
If your CI is not being detected, feel free to [add an issue for it](https://git.nfp.is/TheThing/inside-ci/issues) or hit me up on [X (formerly Twitter)](https://x.com/TheThing89) or on discord as `thething_89`.
2024-11-18 23:57:35 +00:00
# API
`const inside = require('inside-ci')`
2024-11-18 23:57:35 +00:00
# CLI
2024-11-19 10:46:15 +00:00
## `inside-ci` or `in-ci`
2024-11-18 23:57:35 +00:00
Returns error code 0 if inside CI.
2024-11-18 23:57:35 +00:00
`in-ci && echo 'running inside CI'`
2024-11-19 10:46:15 +00:00
## `not-ci`
Inverse of the above:
`not-ci && husky install`