Learn R Programming

ami (version 0.1.1)

using_nix_shell: Detect Nix Shell

Description

using_nix_shell() checks whether code is running within an environment defined by a Nix expression.

Usage

using_nix_shell(pure = NULL)

Value

A logical value

Arguments

pure

Whether or not the environment is pure, meaning most environment variables have been cleared before the shell started.

Examples

Run this code
# Check for Nix
using_nix_shell()

# Check for Nix in a pure environment
using_nix_shell(pure = TRUE)

Run the code above in your browser using DataLab