Skip to main content

Module env_file

Module env_file 

Source
Expand description

.env.worktree generation and environment variable injection.

Functionsยง

copy_and_merge_untracked_files
Copies declared untracked files and directories from repo_root to worktree_path, creating parent directories, and updating matched port variables and COMPOSE_PROJECT_NAME in .env files in-place.
copy_dir_all
Recursively copies a directory and its contents from src to dst.
sanitize_compose_project_name
Sanitizes a string to lowercase alphanumerics and underscores for Docker Compose project names.
update_env_content_with_ports
Updates port variables in-place within an environment file content string, and appends any missing port variables at the end.
write_env_worktree
Generates .env.worktree inside the worktree directory.