cnf_lib/environment/container.rs
1// Copyright (C) 2023 Andreas Hartmann <hartan@7x.de>
2// GNU General Public License v3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5use crate::error::CnfError;
6use std::path::Path;
7
8const CONTAINER_ENV: &str = "/run/.containerenv";
9
10pub fn detect() -> bool {
11 Path::new(CONTAINER_ENV).exists()
12}
13
14pub fn run(_args: &[&str]) -> Result<(), CnfError> {
15 Err(CnfError::NotImplemented("Environment Container".into()))
16}