Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 1023 Bytes

README.md

File metadata and controls

47 lines (28 loc) · 1023 Bytes

Environment::Is static linux

Detect environments like Docker or WSL

SYNOPSIS

use Environment::Is qw( is_docker is_wsl );

if(is_docker()) {
  ...
}

if(is_wsl()) {
  ...
}

DESCRIPTION

This module provides some is_ prefixed functions for detecting certain environments. Additional environments may be added in the future.

FUNCTIONS

is_docker

Returns true if the current process is running inside a docker container.

is_interactive

Return true if the current process is interactive.

is_wsl

Returns true if the current process is running inside Windows Subsystem for Linux (WSL).

AUTHOR

Graham Ollis [email protected]

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.