2024-11-18 23:24:04 +00:00
|
|
|
# inside-ci
|
|
|
|
|
2024-11-22 05:58:44 +00:00
|
|
|
Returns true if code is running inside CI, otherwise false.
|
2024-11-18 23:57:35 +00:00
|
|
|
|
|
|
|
# API
|
|
|
|
|
2024-11-22 05:58:44 +00:00
|
|
|
`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
|
|
|
|
2024-11-22 05:13:45 +00:00
|
|
|
Returns error code 0 if inside CI.
|
2024-11-18 23:57:35 +00:00
|
|
|
|
2024-11-22 05:13:45 +00:00
|
|
|
* `in-ci && echo 'running inside CI'`
|
2024-11-19 10:46:15 +00:00
|
|
|
|
|
|
|
## `not-ci`
|
|
|
|
|
2024-11-22 05:13:45 +00:00
|
|
|
Inverse of the above:
|
|
|
|
|
|
|
|
`not-ci && husky install`
|