Comparing version 0.1.0 to 1.0.0
@@ -5,2 +5,2 @@ #!/usr/bin/env node | ||
process.exitCode = isPodman() ? 0 : 2 | ||
process.exitCode = isPodman() ? 0 : 2 |
@@ -6,6 +6,6 @@ /** | ||
``` | ||
import isPodman = require('is-podman); | ||
import isPodman = require('is-podman) | ||
if (isPodman()) { | ||
console.log('Running inside a Podman container'); | ||
console.log('Running inside a Podman container') | ||
} | ||
@@ -12,0 +12,0 @@ ``` |
@@ -5,3 +5,3 @@ 'use strict' | ||
/** | ||
* Checks for the presence of `/run/.containerenv`, which is present within Podman containers, but within Docker containers | ||
* Checks for the presence of `/run/.containerenv`, which is present within Podman containers, but not within Docker containers (which have `/.dockerenv` instead) | ||
* @returns {boolean} | ||
@@ -22,2 +22,2 @@ */ | ||
module.exports = isPodman | ||
module.exports = isPodman |
{ | ||
"name": "is-podman", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Check if the process is running inside a Podman container", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
# is-podman | ||
`is-podman` is an NPM module that checks whether a process is running inside a Podman container. This module is intended to work similarly to sindresorhus' `is-docker` [module](https://www.npmjs.com/package/is-docker) | ||
`is-podman` is an NPM module that checks whether a process is running inside a Podman container. This module is intended to work similarly to sindresorhus' `is-docker [module](https://www.npmjs.com/package/is-docker). | ||
@@ -11,17 +11,25 @@ ## Install | ||
## Usage | ||
## Code Usage | ||
```js | ||
import isPodman = require('is-podman); | ||
import isPodman = require('is-podman') | ||
if (isPodman()) { | ||
console.log('Running inside a Podman container'); | ||
console.log('Running inside a Podman container') | ||
} | ||
``` | ||
## CLI | ||
## CLI Usage | ||
``` | ||
$ is-podman | ||
``` | ||
Exits with code 0 if inside a Podman container and 2 if not. | ||
Exits with code 0 if inside a Podman container and 2 if not. | ||
## Testing | ||
Both the code and CLI functionality were tested on WSL in the following environemtnts: | ||
1. no containerization | ||
1. Docker | ||
1. Podman | ||
Behavior was as expected, but no formal tests have been written yet. |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3361
34
2
34