From 3d4ca7efa1716d837ca9364e078302fecffa3169 Mon Sep 17 00:00:00 2001 From: Daniel Sauble Date: Thu, 30 Jul 2026 21:31:09 +0000 Subject: [PATCH 1/2] docs(activation): fix profile.d ordering vs [vars] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit profile.d scripts run before [vars] is set, not after — confirmed against Tanja's profile.d/plugins architecture doc. James caught the discrepancy in #53 while reviewing the merged activation-timeline change. --- concepts/activation.mdx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/concepts/activation.mdx b/concepts/activation.mdx index b4f3eb6..628a994 100644 --- a/concepts/activation.mdx +++ b/concepts/activation.mdx @@ -247,8 +247,8 @@ sequenceDiagram rect rgb(235, 248, 240) Note over P: bash P->>P: run setup scripts - P->>P: set user variables P->>P: source profile.d scripts (plugins) + P->>P: set user variables P->>P: source hook.on-activate P->>P: exec FLOX_SHELL end @@ -278,10 +278,11 @@ which is also the variable you can use to override which shell Flox uses when you activate an environment. As part of this activation script, -Flox runs some initial setup, then sets the variables you've provided in the -[[vars] section of your manifest](/man/manifest.toml#vars). -It then sources every installed package's `profile.d` scripts — this is how -[plugins](/concepts/plugins) hook into activation. +Flox runs some initial setup, then sources every installed package's +`profile.d` scripts — this is how [plugins](/concepts/plugins) hook into +activation. Next, it sets the variables you've provided in the +[[vars] section of your manifest](/man/manifest.toml#vars) — these aren't yet +visible to profile.d scripts, only to what runs after them. Next, the script _sources_ the `hook.on-activate` script that you've provided in the [[hook] section of your manifest](/man/manifest.toml#hook). Since this script is run by the Bash shell we're using, From 7d8f210b4a36406c62650012a0dab55cc824739a Mon Sep 17 00:00:00 2001 From: Daniel Sauble Date: Tue, 4 Aug 2026 22:18:31 +0000 Subject: [PATCH 2/2] docs(activation): note profile.d is skipped in run mode Addresses Tanja's review comment on #55: package profile.d scripts (the plugin hook) only source in dev/build mode per activate's mode switch; run mode sources only the fixed run-mode-paths script. Also drops the stale "yet" per Daniel's own suggested-change review comment -- vars are never visible to profile.d scripts, not just not yet. --- concepts/activation.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/concepts/activation.mdx b/concepts/activation.mdx index 628a994..ac00e35 100644 --- a/concepts/activation.mdx +++ b/concepts/activation.mdx @@ -280,8 +280,10 @@ you activate an environment. As part of this activation script, Flox runs some initial setup, then sources every installed package's `profile.d` scripts — this is how [plugins](/concepts/plugins) hook into -activation. Next, it sets the variables you've provided in the -[[vars] section of your manifest](/man/manifest.toml#vars) — these aren't yet +activation. This only happens in `dev` (the default) and `build` modes; +`run` mode deliberately skips package `profile.d` scripts. Next, it sets +the variables you've provided in the +[[vars] section of your manifest](/man/manifest.toml#vars) — these aren't visible to profile.d scripts, only to what runs after them. Next, the script _sources_ the `hook.on-activate` script that you've provided in the [[hook] section of your manifest](/man/manifest.toml#hook).