Quick tool to check if we are inside a CI environment
Find a file
Jonatan Nilsson 853f9b8f78
All checks were successful
/ deploy (push) Successful in 21s
Implement basic ci detection
2024-11-18 23:58:24 +00:00
.forgejo/workflows Implement basic ci detection 2024-11-18 23:58:24 +00:00
.gitignore Initial commit 2024-11-18 23:24:04 +00:00
index.d.ts Implement basic ci detection 2024-11-18 23:58:24 +00:00
index.js Implement basic ci detection 2024-11-18 23:58:24 +00:00
LICENSE Initial commit 2024-11-18 23:24:04 +00:00
package-lock.json Implement basic ci detection 2024-11-18 23:58:24 +00:00
package.json Implement basic ci detection 2024-11-18 23:58:24 +00:00
README.md Implement basic ci detection 2024-11-18 23:58:24 +00:00
test.mjs Implement basic ci detection 2024-11-18 23:58:24 +00:00

inside-ci

Quick tool to check if we are inside a CI environment

API

insideCi()

Returns true if inside CI. Otherwise returns false.

CLI

inside-ci

Returns code 0 if inside CI. Otherwise returns an error code of 1.

inside-ci || echo 'We are not inside CI, install some stuff' inside-ci && echo 'We are inside CI, install some stuff'

Example:

is-ci || husky install