Skip to content

feat: expose runtime markers #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2024
Merged

feat: expose runtime markers #223

merged 2 commits into from
Jun 6, 2024

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Jun 6, 2024

Fixes: #212

This PR adds logic to set extra environment variables to indicate the runtime.

See DEVCONTAINER, ENVBUILDER, and DEVCONTAINER_CONFIG:

root ➜ /workspaces/deno (main) $ env
DEVCONTAINER=true
HOSTNAME=da273e13e9d3
PWD=/workspaces/deno
HOME=/root
CARGO_HOME=/usr/local/cargo
DENO_INSTALL=/usr/local
TERM=xterm
RUSTUP_HOME=/usr/local/rustup
USER=root
INIT_SCRIPT=bash
GIT_URL=https://github.com/denoland/deno
SHLVL=1
PROMPT_DIRTRIM=4
KANIKO_DIR=/.envbuilder
ENVBUILDER=true
RUST_VERSION=1.78.0
PATH=/usr/local/cargo/bin:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
DOCKER_CONFIG=/.envbuilder
DEVCONTAINER_CONFIG=/workspaces/deno/.devcontainer/devcontainer.json
_=/usr/bin/env

@mtojek mtojek self-assigned this Jun 6, 2024
@mtojek mtojek requested a review from dannykopping June 6, 2024 08:22
@mtojek mtojek marked this pull request as ready for review June 6, 2024 08:22
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtojek mtojek merged commit 8e22427 into main Jun 6, 2024
3 checks passed
@mtojek mtojek deleted the 212-env-runtime branch June 6, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way for programs to know they're running inside a devcontainer/envbuilder workspace
2 participants