Skip to main content

Module activate

Module activate 

Source
Expand description

Shell activation.

Two mechanisms (both offered, like mise):

  • Shims (default): the shims dir on PATH; robust in IDEs/CI. Set up by osdk itself when tools are installed.
  • Shell activation (osdk activate <shell>): injects a hook that runs osdk hook-env on each prompt / dir change, putting a project’s installed commands before global shims and active versions’ real bin dirs, and exporting their env (GOROOT/JAVA_HOME/…).

This module renders the per-shell snippets and computes the env delta.

Structs§

EnvDelta
The env changes to apply for the active toolset in cwd.

Enums§

Shell

Functions§

activation_script
Render the shell-integration snippet for osdk activate <shell>. The snippet wires a prompt/dir-change hook that evals osdk hook-env.
canonical_project_npm_specs
Reconstruct canonical npm backend specs from project tool entries without letting raw-key ordering decide which of two aliases wins.
compute_env_delta
Compute the env delta for the directory cwd: for each backend with an active + installed version, collect its bin dirs and exec env. Invalid dynamic-tool inventory aborts activation instead of producing a partial environment that could route around the configured tool.
deactivation_script
Render shell code that removes osdk’s hook and restores the environment captured by render_hook_env.
render_hook_env
Render hook-env output: shell commands that prepend PATH and set vars.