diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4601b38c42..3ff8908f64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,6 +124,28 @@ pub enum SortBy { } ``` +## Tests + +To run all tests, use: +```bash +pixi run test +``` +But if you have modified recipe data under the tests/data/channels directory, you need to update the test channel before running tests: +```bash +pixi run update-test-channel +``` +> [!NOTE] +> This task currently only works on unix systems. If you are on Windows, it is recommended to use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install). + +For example, if you modified data for dummy_channel_1: +```bash +pixi run update-test-channel dummy_channel_1 +``` +After updating the test channel, run the tests again: +``` +pixi run test +``` + ## CLI documentation The CLI reference is automatically generated from the code documentation of CLI commands under `src/cli`. @@ -136,4 +158,4 @@ and `pixi run -e docs mkdocs serve` to check out the web docs locally. You must commit the generated files as well as part of your PR. The `*_extender` files under `docs/reference/cli` are meant as extensions of the autogenerated documentation. -Those are meant to be updated manually. \ No newline at end of file +Those are meant to be updated manually. diff --git a/docs/reference/environment_variables.md b/docs/reference/environment_variables.md index 1d1938dcbb..36a537cdc4 100644 --- a/docs/reference/environment_variables.md +++ b/docs/reference/environment_variables.md @@ -50,3 +50,117 @@ The following environment variables are set by Pixi, when using the `pixi run`, !!! note Even though the variables are environment variables these cannot be overridden. E.g. you can not change the root of the project by setting `PIXI_PROJECT_ROOT` in the environment. + +## Environment Variable Priority + +The following priority rule applies for environment variables: `task.env` > `activation.env` > `activation.scripts` > activation scripts of dependencies > outside environment variables. +Variables defined at a higher priority will override those defined at a lower priority. + +!!! warning + + In older versions of Pixi, this priority was not well-defined, and there are a number of known + deviations from the current priority which exist in some older versions. + Please see the warning in [the advanced tasks documentation](../workspace/advanced_tasks.md#environment-variables) + for further details and migration guidance. + +##### Example 1: `task.env` > `activation.env` + +In `pixi.toml`, we defined an environment variable `HELLO_WORLD` in both `tasks.hello` and `activation.env`. + +When we run `echo $HELLO_WORLD`, it will output: +``` +Hello world! +``` + +```toml title="pixi.toml" +[tasks.hello] +cmd = "echo $HELLO_WORLD" +env = { HELLO_WORLD = "Hello world!" } +[activation.env] +HELLO_WORLD = "Activate!" +``` + +##### Example 2: `activation.env` > `activation.scripts` + +In `pixi.toml`, we defined the same environment variable `DEBUG_MODE` in both `activation.env` and in the activation script file `setup.sh`. +When we run `echo Debug mode: $DEBUG_MODE`, it will output: +```bash +Debug mode: enabled +``` + +```toml title="pixi.toml" +[activation.env] +DEBUG_MODE = "enabled" + +[activation] +scripts = ["setup.sh"] +``` + +```bash title="setup.sh" +export DEBUG_MODE="disabled" +``` + +##### Example 3: `activation.scripts` > activation scripts of dependencies + +In `pixi.toml`, we have our local activation script and a dependency `my-package` that also sets environment variables through its activation scripts. +When we run `echo Library path: $LIB_PATH`, it will output: +``` +Library path: /my/lib +``` + +```toml title="pixi.toml" +[activation] +scripts = ["local_setup.sh"] + +[dependencies] +my-package = "*" # This package has its own activation scripts that set LIB_PATH="/dep/lib" +``` +```bash title="local_setup.sh" +export LIB_PATH="/my/lib" +``` + +##### Example 4: activation scripts of dependencies > outside environment variable + +If we have a dependency that sets `PYTHON_PATH` and the same variable is already set in the outside environment. +When we run `echo Python path: $PYTHON_PATH`, it will output: +```bash +Python path: /pixi/python +``` +``` +# Outside environment +export PYTHON_PATH="/system/python" +``` +```toml title="pixi.toml" +[dependencies] +python-utils = "*" # This package sets PYTHON_PATH="/pixi/python" in its activation scripts +``` + +##### Example 5: Complex Example - All priorities combined +In `pixi.toml`, we define the same variable `APP_CONFIG` across multiple levels: +```toml title="pixi.toml" +[tasks.start] +cmd = "echo Config: $APP_CONFIG" +env = { APP_CONFIG = "task-specific" } + +[activation.env] +APP_CONFIG = "activation-env" + +[activation] +scripts = ["app_setup.sh"] + +[dependencies] +config-loader = "*" # Sets APP_CONFIG="dependency-config" +``` +```bash title="app_setup.sh" +export APP_CONFIG="activation-script" +``` +```bash +# Outside environment +export APP_CONFIG="system-config" +``` + +Since `task.env` has the highest priority, when we run `pixi run start` it will output: + +``` +Config: task-specific +``` diff --git a/docs/workspace/advanced_tasks.md b/docs/workspace/advanced_tasks.md index 65fd09f1d2..aa435ec285 100644 --- a/docs/workspace/advanced_tasks.md +++ b/docs/workspace/advanced_tasks.md @@ -324,33 +324,51 @@ Note: if you want to debug the globs you can use the `--verbose` flag to see whi pixi run -v start ``` -## Environment variables -You can set environment variables for a task. -These are seen as "default" values for the variables as you can overwrite them from the shell. +## Environment Variables -```toml title="pixi.toml" -[tasks] -echo = { cmd = "echo $ARGUMENT", env = { ARGUMENT = "hello" } } -``` -If you run `pixi run echo` it will output `hello`. -When you set the environment variable `ARGUMENT` before running the task, it will use that value instead. +You can set environment variables directly for a task, as well as by other means. +See [the environment variable priority documentation](../reference/environment_variables.md#environment-variable-priority) for full details of ways to set environment variables, +and how those ways interact with each other. -```shell -ARGUMENT=world pixi run echo -✨ Pixi task (echo in default): echo $ARGUMENT -world -``` +!!! warning -These variables are not shared over tasks, so you need to define these for every task you want to use them in. + In older versions of Pixi, this priority was not well-defined, and there are a number of known + deviations from the current priority which exist in some older versions: + + - `activation.scripts` used to take priority over `activation.env` + - activation scripts of dependencies used to take priority over `activation.env` + - outside environment variables used to override variables set in `task.env` + + If you previously relied on a certain priority which no longer applies, you may need to change your + task definitions. + + For the specific case of overriding `task.env` with outside environment variables, this behaviour can + now be recreated using [task arguments](#task-arguments). For example, if you were previously using + a setup like: -!!! note "Extend instead of overwrite" - If you use the same environment variable in the value as in the key of the map you will also overwrite the variable. - For example overwriting a `PATH` ```toml title="pixi.toml" [tasks] - echo = { cmd = "echo $PATH", env = { PATH = "/tmp/path:$PATH" } } + echo = { cmd = "echo $ARGUMENT", env = { ARGUMENT = "hello" } } + ``` + + ```shell + ARGUMENT=world pixi run echo + ✨ Pixi task (echo in default): echo $ARGUMENT + world + ``` + + you can now recreate this behaviour like: + + ```toml title="pixi.toml" + [tasks] + echo = { cmd = "echo {{ ARGUMENT }}", args = [{"arg" = "ARGUMENT", "default" = "hello" }]} + ``` + + ```shell + pixi run echo world + ✨ Pixi task (echo): echo world + world ``` - This will output `/tmp/path:/usr/bin:/bin` instead of the original `/usr/bin:/bin`. ## Clean environment You can make sure the environment of a task is "Pixi only". diff --git a/src/activation.rs b/src/activation.rs index 7d92733e66..a0763e4412 100644 --- a/src/activation.rs +++ b/src/activation.rs @@ -236,6 +236,19 @@ async fn try_get_valid_activation_cache( } } +// Extract variable name +fn extract_variable_name(value: &str) -> Option<&str> { + if let Some(inner) = value.strip_prefix('$') { + Some(inner) + } else if let Some(inner) = value.strip_prefix('%').and_then(|s| s.strip_suffix('%')) { + Some(inner) + } else if let Some(inner) = value.strip_prefix("${").and_then(|s| s.strip_suffix('}')) { + Some(inner) + } else { + None + } +} + /// Runs and caches the activation script. pub async fn run_activation( environment: &Environment<'_>, @@ -286,7 +299,7 @@ pub async fn run_activation( let current_env = std::env::vars().collect::>(); // Run and cache the activation script - activator.run_activation( + let new_activator = activator.run_activation( ActivationVariables { // Get the current PATH variable path: Default::default(), @@ -301,7 +314,29 @@ pub async fn run_activation( current_env, }, None, - ) + ); + + // `activator.env_vars` should override `activator_result` for duplicate keys + new_activator.map(|mut map: HashMap| { + // First pass: Add all variables from activator.env_vars(as map is unordered, we need to update the referenced value in the second loop) + for (k, v) in &activator.env_vars { + map.insert(k.clone(), v.clone()); + } + + // Second pass: Loop through the map and resolve variable references + let keys_to_update: Vec = map.keys().cloned().collect(); + for key in keys_to_update { + if let Some(value) = map.get(&key).cloned() { + if let Some(referenced_var) = extract_variable_name(&value) { + if let Some(actual_value) = map.get(referenced_var) { + map.insert(key, actual_value.clone()); + } + } + } + } + + map + }) }) .await .into_diagnostic()? diff --git a/src/cli/run.rs b/src/cli/run.rs index dbfc8eb585..af0f4a2161 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -373,7 +373,7 @@ async fn execute_task( command_env: &HashMap, kill_signal: KillSignal, ) -> Result<(), TaskExecutionError> { - let Some(script) = task.as_deno_script()? else { + let Some(script) = task.as_deno_script(command_env)? else { return Ok(()); }; let cwd = task.working_directory()?; diff --git a/src/task/executable_task.rs b/src/task/executable_task.rs index fff3f1dce2..ee0ae9bdcd 100644 --- a/src/task/executable_task.rs +++ b/src/task/executable_task.rs @@ -1,6 +1,6 @@ use std::{ borrow::Cow, - collections::HashMap, + collections::{HashMap, HashSet}, ffi::OsString, fmt::{Display, Formatter}, path::PathBuf, @@ -10,6 +10,7 @@ use deno_task_shell::{ ShellPipeWriter, ShellState, execute_with_pipes, parser::SequentialList, pipe, }; use fs_err::tokio as tokio_fs; +use indexmap::IndexMap; use itertools::Itertools; use miette::{Context, Diagnostic}; use pixi_consts::consts; @@ -129,7 +130,10 @@ impl<'p> ExecutableTask<'p> { } /// Returns the task as script - fn as_script(&self) -> Result, FailedToParseShellScript> { + fn as_script( + &self, + command_env: IndexMap, + ) -> Result, FailedToParseShellScript> { // Convert the task into an executable string let task = self .task @@ -137,7 +141,7 @@ impl<'p> ExecutableTask<'p> { .map_err(FailedToParseShellScript::ArgumentReplacement)?; if let Some(task) = task { // Get the export specific environment variables - let export = get_export_specific_task_env(self.task.as_ref()); + let export = get_export_specific_task_env(self.task.as_ref(), command_env); // Append the command line arguments verbatim let cli_args = if let ArgValues::FreeFormArgs(additional_args) = &self.args { @@ -167,8 +171,13 @@ impl<'p> ExecutableTask<'p> { /// an alias. pub(crate) fn as_deno_script( &self, + command_env: &HashMap, ) -> Result, FailedToParseShellScript> { - let full_script = self.as_script()?; + let command_env_converted: IndexMap = command_env + .iter() + .filter_map(|(k, v)| Some((k.to_str()?.to_string(), v.to_str()?.to_string()))) + .collect(); + let full_script = self.as_script(command_env_converted)?; if let Some(full_script) = full_script { tracing::debug!("Parsing shell script: {}", full_script); @@ -239,7 +248,7 @@ impl<'p> ExecutableTask<'p> { command_env: &HashMap, input: Option<&[u8]>, ) -> Result { - let Some(script) = self.as_deno_script()? else { + let Some(script) = self.as_deno_script(command_env)? else { return Ok(RunOutput { exit_code: 0, stdout: String::new(), @@ -384,24 +393,112 @@ fn get_output_writer_and_handle() -> (ShellPipeWriter, JoinHandle) { (writer, handle) } -/// Task specific environment variables. -fn get_export_specific_task_env(task: &Task) -> String { - // Append the environment variables if they don't exist - let mut export = String::new(); - if let Some(env) = task.env() { - for (key, value) in env { - if value.contains(format!("${}", key).as_str()) || std::env::var(key.as_str()).is_err() - { - tracing::info!("Setting environment variable: {}=\"{}\"", key, value); - export.push_str(&format!("export \"{}={}\";\n", key, value)); - } else { - tracing::info!("Environment variable {} already set", key); +struct EnvMap { + command_env: IndexMap, + task_specific_envs: IndexMap, +} + +impl EnvMap { + fn new( + command_env: IndexMap, + task_specific_envs: Option<&IndexMap>, + ) -> Self { + Self { + command_env, + task_specific_envs: task_specific_envs.cloned().unwrap_or_default(), + } + } + + // Get environment by key - returns reference to IndexMap directly + fn get(&self, key: &str) -> Option<&IndexMap> { + match key { + "command_env" => Some(&self.command_env), + "task_specific_envs" => Some(&self.task_specific_envs), + _ => None, + } + } + + // Priority keys sorted from lowest to highest priority + fn priority_keys(&self) -> [&'static str; 2] { + ["command_env", "task_specific_envs"] + } + + // Check if task_specific_envs contains a key + fn task_specific_contains_key(&self, key: &str) -> bool { + self.task_specific_envs.contains_key(key) + } + + // Merge by priority + fn merge_by_priority(&self) -> IndexMap { + let mut merged = IndexMap::new(); + + // Apply priority order: from lowest to highest using priority_keys() + for key in self.priority_keys() { + if let Some(env_map_key) = self.get(key) { + merged.extend(env_map_key.clone()); } } + + merged } - export } +/// Get the environment variables based on their priority +fn get_export_specific_task_env(task: &Task, command_env: IndexMap) -> String { + // Early return if task.env() is empty + if task.env().is_none_or(|map| map.is_empty()) { + return String::new(); + } + + // Define keys that should not be overridden + let override_excluded_keys: HashSet<&str> = [ + "PIXI_PROJECT_ROOT", + "PIXI_PROJECT_NAME", + "PIXI_PROJECT_VERSION", + "PIXI_PROMPT", + "PIXI_ENVIRONMENT_NAME", + "PIXI_ENVIRONMENT_PLATFORMS", + "CONDA_PREFIX", + "CONDA_DEFAULT_ENV", + "PATH", + "INIT_CWD", + "PWD", + ] + .iter() + .cloned() + .collect(); + + // Create environment map struct + let env_map = EnvMap::new(command_env.clone(), task.env()); + + let task_env = task + .env() + .expect("Task environment should exist at this point"); + + // Determine export strategy + let export_merged = if task_env.keys().all(|k| !command_env.contains_key(k)) { + // If task.env() and command_env don't have duplicated keys, simply export task.env(). + task_env.clone() + } else { + // Handle conflicts with priority merging + env_map.merge_by_priority() + }; + + // Build export string + // Put all merged environment variables to export. + // Only the keys that are in "task_specific_envs" map would be exported. + let mut export = String::new(); + for (key, value) in export_merged { + let should_exclude = override_excluded_keys.contains(key.as_str()); + + if env_map.task_specific_contains_key(&key) && !should_exclude { + tracing::info!("Setting environment variable: {}=\"{}\"", key, value); + export.push_str(&format!("export \"{}={}\";\n", key, value)); + } + } + + export +} /// Determine the environment variables to use when executing a command. The /// method combines the activation environment with the system environment /// variables. @@ -461,10 +558,10 @@ mod tests { "#; #[test] - fn test_export_specific_task_env() { + fn test_export_specific_task_env_merge() { let file_contents = r#" [tasks] - test = {cmd = "test", cwd = "tests", env = {FOO = "bar", BAR = "$FOO"}} + test = {cmd = "test", cwd = "tests", env = {FOO = "bar"}} "#; let workspace = Workspace::from_str( Path::new("pixi.toml"), @@ -476,10 +573,53 @@ mod tests { .default_environment() .task(&TaskName::from("test"), None) .unwrap(); + // Environment Variables + let mut my_map: IndexMap = IndexMap::new(); + + my_map.insert("PATH".to_string(), "myPath".to_string()); + my_map.insert("HOME".to_string(), "myHome".to_string()); + + let result = get_export_specific_task_env(task, my_map); + + let expected_prefix = "export \"FOO=bar\""; + let path_prefix = "export \"PATH=myPath\""; + let home_prefix = "export \"HOME=myHome\""; - let export = get_export_specific_task_env(task); + assert!(result.contains(expected_prefix)); + // keys not defined in the task are not exported + assert!(!result.contains(path_prefix)); + assert!(!result.contains(home_prefix)); + } + + #[test] + fn test_export_specific_task_env_priority() { + let file_contents = r#" + [tasks] + test = {cmd = "test", cwd = "tests", env = {FOO = "bar"}} + "#; + let workspace = Workspace::from_str( + Path::new("pixi.toml"), + &format!("{PROJECT_BOILERPLATE}\n{file_contents}"), + ) + .unwrap(); - assert_eq!(export, "export \"FOO=bar\";\nexport \"BAR=$FOO\";\n"); + let task = workspace + .default_environment() + .task(&TaskName::from("test"), None) + .unwrap(); + // Environment Variables + let mut my_map: IndexMap = IndexMap::new(); + + my_map.insert("FOO".to_string(), "123".to_string()); + my_map.insert("HOME".to_string(), "myHome".to_string()); + + let result = get_export_specific_task_env(task, my_map); + // task specific env overrides outside environment variables + let expected_prefix = "export \"FOO=bar\""; + let home_prefix = "export \"HOME=myHome\""; + assert!(result.contains(expected_prefix)); + // keys not defined in the task are not exported + assert!(!result.contains(home_prefix)); } #[test] @@ -508,8 +648,24 @@ mod tests { args: ArgValues::default(), }; - let script = executable_task.as_script().unwrap().unwrap(); - assert_eq!(script, "export \"FOO=bar\";\n\ntest "); + // Environment Variables + let mut my_map: IndexMap = IndexMap::new(); + + my_map.insert("PATH".to_string(), "myPath".to_string()); + my_map.insert("HOME".to_string(), "myHome".to_string()); + + let result = executable_task.as_script(my_map); + + let expected_prefix = "export \"FOO=bar\""; + + let script = result.unwrap().expect("Script should not be None"); + let path_prefix = "export \"PATH=myPath\""; + let home_prefix = "export \"HOME=myHome\""; + + assert!(script.contains(expected_prefix)); + // keys not defined in the task are not included + assert!(!script.contains(path_prefix)); + assert!(!script.contains(home_prefix)); } #[tokio::test] diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-a-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-a-0.1.0-hb0f4dca_0.conda index 96bf4db59c..c4d610ddd9 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-a-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-a-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-b-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-b-0.1.0-hb0f4dca_0.conda index 1d45deb54f..0ebeb7804f 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-b-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-b-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-c-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-c-0.1.0-hb0f4dca_0.conda index f2309d2890..18043ed4ce 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-c-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-c-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-d-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-d-0.1.0-hb0f4dca_0.conda index dc6d32c292..5a8c63d692 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-d-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-d-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-f-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-f-0.1.0-hb0f4dca_0.conda index 81ba28575d..0f9446fc63 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-f-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-f-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-g-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-g-0.1.0-hb0f4dca_0.conda index 8568941612..a87bd24ede 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-g-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy-g-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy_e-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy_e-0.1.0-hb0f4dca_0.conda index 572d6067e0..76e2bc347a 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/dummy_e-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/dummy_e-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/pixi-foobar-0.1.0-hb0f4dca_0.conda b/tests/data/channels/channels/dummy_channel_1/linux-64/pixi-foobar-0.1.0-hb0f4dca_0.conda index 0f43e798dc..c73d3de005 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/linux-64/pixi-foobar-0.1.0-hb0f4dca_0.conda and b/tests/data/channels/channels/dummy_channel_1/linux-64/pixi-foobar-0.1.0-hb0f4dca_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/linux-64/repodata.json b/tests/data/channels/channels/dummy_channel_1/linux-64/repodata.json index 6de521f28b..a34eaaa24e 100644 --- a/tests/data/channels/channels/dummy_channel_1/linux-64/repodata.json +++ b/tests/data/channels/channels/dummy_channel_1/linux-64/repodata.json @@ -1 +1 @@ -{"info":{"subdir":"linux-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-c"],"md5":"dcf5fc50ecc7af8c95599e41c4aa71e8","name":"dummy-a","platform":"linux","sha256":"8a4e574a4bebf4a534c311ddac4a083a94548e8d448d5da6adc2de17f8dc0edf","size":1403,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy-b-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"e9b3444c479ae4dd6a22555c5df11fe8","name":"dummy-b","platform":"linux","sha256":"c4aafe28491d76dd8b6577b5271302e9d1d4b90d9fa18d5c7cae90747cf92681","size":1179,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy-c-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"4ae3f5c8da6c8799bb0a0cf2162ed773","name":"dummy-c","platform":"linux","sha256":"62d8d58b4e817262fbc72f7f43d7e49c8cbb832349b849817e731fdf40466a26","size":1175,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy-d-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-x"],"md5":"67edbe2743fc68c7797b06d1552df856","name":"dummy-d","platform":"linux","sha256":"3993ab3c3f42c7717ef9a8e74d27d6ce683a1d0472e64d11cda6fafea40a486c","size":1184,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy-f-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"9ba79381eb60607fd9428c687ea5f3e5","name":"dummy-f","platform":"linux","sha256":"04212cbd57721b60e40ec8a4f957854a9e323ed39727f7b6d8508658f265499d","size":1179,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy-g-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-b"],"md5":"05b64f1aa0c53c1dc135b5fa3ccbd733","name":"dummy-g","platform":"linux","sha256":"741d213b374ec40a3466bcf8204333277c774eafe5f890ee6bb1db289277bead","size":1188,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"dummy_e-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"4339286bf47db2b9f64899b3f60b72e2","name":"dummy_e","platform":"linux","sha256":"5b64dd603fcb85f2905cc4280f1af6cde12d7c28879e4823e4fdbb6cf9e90913","size":1254,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"},"pixi-foobar-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"6fce6575108f46a2359c8d3a4f9355e7","name":"pixi-foobar","platform":"linux","sha256":"d0d5abdf0f496e4ad12761d00a9141a83d01cc367bdeeb0ae5525bcd9466dfd6","size":1188,"subdir":"linux-64","timestamp":1750924031224,"version":"0.1.0"}},"repodata_version":2} +{"info":{"subdir":"linux-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-c"],"md5":"8657d2af388223d5b8d261c5d679acbf","name":"dummy-a","platform":"linux","sha256":"58ca05b305a9a9aefa7f8b2edb357157442343cce0e271f53ddbf67b4ea9899e","size":1401,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy-b-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"c40bb9483a0614400587a69a7f458130","name":"dummy-b","platform":"linux","sha256":"63013a0d724be375c4a45538a3fab832c59f8f2366accb9ee7f2932854415486","size":1179,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy-c-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"a1bfdd0f9bb8ef9841927f7528155eeb","name":"dummy-c","platform":"linux","sha256":"feaa251f25f211c876f3c8238f92ddca7a2d65d8eea34dc116bc0a0a970cd93c","size":1176,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy-d-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-x"],"md5":"760cdd5469ecf8fdc5a59fb88ce8e225","name":"dummy-d","platform":"linux","sha256":"3d67ec940571d473f421fa3c60236f08f7bf71565c381faa9c00817eac0a2dca","size":1188,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy-f-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"cb21360ceb1070bbdd76d1106ea33a1b","name":"dummy-f","platform":"linux","sha256":"41ac68a786e7ef07c61374df2f8c5ad8a6c0ecfb07d8d3d623b8f103115c05de","size":1180,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy-g-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":["dummy-b"],"md5":"8ce86a11b7d39171da403ccbb6fc11f9","name":"dummy-g","platform":"linux","sha256":"6737d81a61f4105ccbdd079b39c37fb02d8551657c5bb06ef016ebe2eb7fd864","size":1185,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"dummy_e-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"ca8d21e5be031154b255cb0f72092d94","name":"dummy_e","platform":"linux","sha256":"5eae7b7327c8dde677468b3c8760a063859271d50a709cf34ac701df5d9ad7ed","size":1250,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"},"pixi-foobar-0.1.0-hb0f4dca_0.conda":{"arch":"x86_64","build":"hb0f4dca_0","build_number":0,"depends":[],"md5":"77fa155885a5a4303dc3beb0987c5de9","name":"pixi-foobar","platform":"linux","sha256":"bc0a852c0c85a17d73fa545a030c23794d74ea673478bae790c1582efcb22132","size":1320,"subdir":"linux-64","timestamp":1752762371321,"version":"0.1.0"}},"repodata_version":2} \ No newline at end of file diff --git a/tests/data/channels/channels/dummy_channel_1/noarch/repodata.json b/tests/data/channels/channels/dummy_channel_1/noarch/repodata.json index 8010a6626c..d6f6f3f3cc 100644 --- a/tests/data/channels/channels/dummy_channel_1/noarch/repodata.json +++ b/tests/data/channels/channels/dummy_channel_1/noarch/repodata.json @@ -1 +1 @@ -{"info":{"subdir":"noarch"},"packages":{},"packages.conda":{},"repodata_version":2} +{"info":{"subdir":"noarch"},"packages":{},"packages.conda":{},"repodata_version":2} \ No newline at end of file diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-a-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-a-0.1.0-h0dc7051_0.conda index 15cbfd3fb3..5414933a82 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-a-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-a-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-b-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-b-0.1.0-h0dc7051_0.conda index 2c5cbb8e5c..ea8d289e49 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-b-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-b-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-c-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-c-0.1.0-h0dc7051_0.conda index 0cc3eb98d8..d698b909f9 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-c-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-c-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-d-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-d-0.1.0-h0dc7051_0.conda index 22261c3a27..be38e145f8 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-d-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-d-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-f-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-f-0.1.0-h0dc7051_0.conda index d8cbaf2650..e6d377692d 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-f-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-f-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-g-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-g-0.1.0-h0dc7051_0.conda index c34c2d9691..9ab721f9f5 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-g-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy-g-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy_e-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy_e-0.1.0-h0dc7051_0.conda index 605a1e8377..aaacd5d5d3 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/dummy_e-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/dummy_e-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/pixi-foobar-0.1.0-h0dc7051_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-64/pixi-foobar-0.1.0-h0dc7051_0.conda index ada73ffe63..7b8e0e20b9 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-64/pixi-foobar-0.1.0-h0dc7051_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-64/pixi-foobar-0.1.0-h0dc7051_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-64/repodata.json b/tests/data/channels/channels/dummy_channel_1/osx-64/repodata.json index 7238f66424..cebcb05420 100644 --- a/tests/data/channels/channels/dummy_channel_1/osx-64/repodata.json +++ b/tests/data/channels/channels/dummy_channel_1/osx-64/repodata.json @@ -1 +1 @@ -{"info":{"subdir":"osx-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-c"],"md5":"0fa6b0aff4e33fb1d2e1f51a83100f7e","name":"dummy-a","platform":"osx","sha256":"a161bcfa602c6628cc5a01a21764ae09a6ff5707f34064424850f17b40a60ea4","size":1400,"subdir":"osx-64","timestamp":1750924031761,"version":"0.1.0"},"dummy-b-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"f902000801b25764ec2e4c285ed27bfb","name":"dummy-b","platform":"osx","sha256":"79f241afe3abdb6f23da647b60b7cd63aaf5a999af030f043204769b411df4bb","size":1172,"subdir":"osx-64","timestamp":1750924031761,"version":"0.1.0"},"dummy-c-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"9b7b3bd8202ecb105002df6f34485b22","name":"dummy-c","platform":"osx","sha256":"bf8bccb74494f93cc7470a35c3d63bc4cb3995f6e982e2b254319e795d27b92f","size":1169,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"},"dummy-d-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-x"],"md5":"420648d7ea0c6b0f24ca48f9448b819b","name":"dummy-d","platform":"osx","sha256":"42fc9b0ed09e3a1b6ae451f7a40119392f3b8b755f87a6765be28f4f8e805ef9","size":1181,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"},"dummy-f-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"e963734a29dc7a5b3e16dad2d321e3f2","name":"dummy-f","platform":"osx","sha256":"aacc54a54778097f9fa25afeed280b9d84101d1e1814976af30449eb0bdb6d9c","size":1172,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"},"dummy-g-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-b"],"md5":"42cc31a84f5a560496b22da9ee63b770","name":"dummy-g","platform":"osx","sha256":"48e4d4352530f8ceef88c7b478fdd30b4426ca2d42947b26e7cbe0ae06e30c71","size":1186,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"},"dummy_e-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"56074754ca0b799edd729673c234f86a","name":"dummy_e","platform":"osx","sha256":"de53d5c93436d3e30c08c1ea591b54404590969e211826468887619203e1104f","size":1245,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"},"pixi-foobar-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"f002becc1f333f1ed8113b0f71e3706f","name":"pixi-foobar","platform":"osx","sha256":"7521d8a2dce0c0a0421f7620c8c74d6abc7689ab7311c23a33719c40db5fdaf2","size":1185,"subdir":"osx-64","timestamp":1750924031760,"version":"0.1.0"}},"repodata_version":2} +{"info":{"subdir":"osx-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-c"],"md5":"5df5a00319413f58115c4948ee3346a6","name":"dummy-a","platform":"osx","sha256":"6dbb15becee3bce3701dc845ba7e8195e1a6f7506debba2366b6069eead5cb3e","size":1398,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy-b-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"5707ac1b588a2492ff24ff45c44894f3","name":"dummy-b","platform":"osx","sha256":"7ddd76e7cab308b19db9ed49b004a50a401b8d8856c8690705524000624a0928","size":1173,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy-c-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"a91eadb4c9ad35f301629d8446b1d656","name":"dummy-c","platform":"osx","sha256":"0422cbe752d69cbcc40095efc76b9a1f1b5fae61e31c751d95177c563889c2a4","size":1169,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy-d-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-x"],"md5":"5d332bc45519bc8756a63688e36dab21","name":"dummy-d","platform":"osx","sha256":"0ae80a0df744005efc2fb969a7c52a29f9f8b84b577f8dd8a584e3afebc2b0fa","size":1186,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy-f-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"c88ab33140804d9d1108735e14b08387","name":"dummy-f","platform":"osx","sha256":"8f7f5fa93f74c579fad73209112772f2452e2c2716e96239d3e2842aa90c1ce1","size":1172,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy-g-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":["dummy-b"],"md5":"3e0a4a391f87a2ab33aba18db80356c7","name":"dummy-g","platform":"osx","sha256":"510df8dc83d5e4481d30aa6b9b0f015300576e547d1aab27b1667f9f246ca4b6","size":1183,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"dummy_e-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"8b8c109cc618bccfb29702bd6d03b730","name":"dummy_e","platform":"osx","sha256":"a006bf89a4a0141c5f179511f9b8e4433a6337d931287155dfc6ef9904b134f9","size":1247,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"},"pixi-foobar-0.1.0-h0dc7051_0.conda":{"arch":"x86_64","build":"h0dc7051_0","build_number":0,"depends":[],"md5":"0606358057dbe3ab5b0ba3a19b1ad7cd","name":"pixi-foobar","platform":"osx","sha256":"44ea1aaf5d5b3a955830a32b381c736062cdca6783c69279c89c73f015559cce","size":1319,"subdir":"osx-64","timestamp":1752762375812,"version":"0.1.0"}},"repodata_version":2} \ No newline at end of file diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-a-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-a-0.1.0-h60d57d3_0.conda index a10a3608eb..e4773c815c 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-a-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-a-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-b-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-b-0.1.0-h60d57d3_0.conda index b0973fc62e..4cc8cccdba 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-b-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-b-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-c-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-c-0.1.0-h60d57d3_0.conda index 360a4420ef..1eaa90482d 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-c-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-c-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-d-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-d-0.1.0-h60d57d3_0.conda index 0ff56640fa..5aeb307b1c 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-d-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-d-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-f-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-f-0.1.0-h60d57d3_0.conda index b05dcad857..949c794a21 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-f-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-f-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-g-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-g-0.1.0-h60d57d3_0.conda index 526cf7bfa4..7871fd909e 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-g-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy-g-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy_e-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy_e-0.1.0-h60d57d3_0.conda index 90099e4eab..2b563cd198 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy_e-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/dummy_e-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/pixi-foobar-0.1.0-h60d57d3_0.conda b/tests/data/channels/channels/dummy_channel_1/osx-arm64/pixi-foobar-0.1.0-h60d57d3_0.conda index 0da1229349..6af715c347 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/osx-arm64/pixi-foobar-0.1.0-h60d57d3_0.conda and b/tests/data/channels/channels/dummy_channel_1/osx-arm64/pixi-foobar-0.1.0-h60d57d3_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/osx-arm64/repodata.json b/tests/data/channels/channels/dummy_channel_1/osx-arm64/repodata.json index f5831bf896..42417b7215 100644 --- a/tests/data/channels/channels/dummy_channel_1/osx-arm64/repodata.json +++ b/tests/data/channels/channels/dummy_channel_1/osx-arm64/repodata.json @@ -1 +1 @@ -{"info":{"subdir":"osx-arm64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-c"],"md5":"ddfe9f4c28c61def1271bd693cdd1699","name":"dummy-a","platform":"osx","sha256":"b83286e6f87d659d0aa7311c6c4f5e95e7c47b93992c4251c5ba0e04efbc8351","size":1401,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy-b-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"f0092b57b74ab440e91de043c929bd53","name":"dummy-b","platform":"osx","sha256":"f524e864b4662d94b8a436bef9174cf12bb3b6086297a477f73eac9f8f3b4199","size":1178,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy-c-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"260272b73706f0befc7df5fb41f8777b","name":"dummy-c","platform":"osx","sha256":"1aebcec86cf4f8726720c673b0fc1c9b57fb1a58dc6126c781541fb62b15f239","size":1174,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy-d-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-x"],"md5":"f4f6fd21ea679746de8cadc4de4c40ed","name":"dummy-d","platform":"osx","sha256":"2ddad220d05c7590afb7900dddf9527a5da8f9b1876f65f0452c5dae5790ff7b","size":1183,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy-f-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"08713e776ec27ee9e6eed7d230e85ce8","name":"dummy-f","platform":"osx","sha256":"7acb281d2343e46d7bf1e617faacf7e95101213b77d2cab6307a4d62f47bcda1","size":1177,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy-g-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-b"],"md5":"0068822fc9edc5dabfa3bb6370d3508c","name":"dummy-g","platform":"osx","sha256":"fedcf1050e5a8139f33f3f8f3ff1192a1285ad62f92a51fcd66920cc64266096","size":1186,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"dummy_e-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"d728d0d1659c78ab3a6bc1649654a75b","name":"dummy_e","platform":"osx","sha256":"740fc99ab413702634d44ca1acbe4bd70c5bca7aafe4652e06866f4d46ac8df0","size":1251,"subdir":"osx-arm64","timestamp":1750924031491,"version":"0.1.0"},"pixi-foobar-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"3e5ca560effec6f65e53760d2df57fbe","name":"pixi-foobar","platform":"osx","sha256":"84bed3d12233f2e7c7ee9a6daf23a7c0b49a51fc2287f1e7d5c90d1ae70545c9","size":1188,"subdir":"osx-arm64","timestamp":1750924031490,"version":"0.1.0"}},"repodata_version":2} +{"info":{"subdir":"osx-arm64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-c"],"md5":"1fd2dea2c3ea0394a8201d9a242b5fd9","name":"dummy-a","platform":"osx","sha256":"982668e0f104bcf1c4f9b800de4866831a16ab70c32e1a3fbd26dd258d97d710","size":1401,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy-b-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"b61f02137e9c9c4cd272bda9a53f4226","name":"dummy-b","platform":"osx","sha256":"b0910a81a2340316fbca9dc8015545abbc5e4129872e673393a97ddeef4f56e6","size":1176,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy-c-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"2f60008a5c849f844066f5899774bbe4","name":"dummy-c","platform":"osx","sha256":"993f4d74ede972bd9908775afc35120b0d1c67547f455a8d834525175c2cc063","size":1174,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy-d-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-x"],"md5":"295affeec6891fcba1b95926f89d02ba","name":"dummy-d","platform":"osx","sha256":"08e9f5e41b8c785c6f12af2e95c897ec25e66c83431798093817b203fb5e3fa0","size":1185,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy-f-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"6ca5909f3add6665a733b75d4be083d2","name":"dummy-f","platform":"osx","sha256":"239e6d0a12d81af2040e46fcbbcdcbb346f1570c3878539ab87ccc582295734e","size":1177,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy-g-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":["dummy-b"],"md5":"2c67eb2e111e1e99fc358238dc076da8","name":"dummy-g","platform":"osx","sha256":"ec025b363e90e904beea3c3f3b0a95ac72470985e9cf0dff224eba5587eb4e8c","size":1184,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"dummy_e-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"c16408e873379ce4995191d40d50b094","name":"dummy_e","platform":"osx","sha256":"6d6f09f39bde4ae65d3422fdd4573861338dee5a51c0b790eefe895a365adc5f","size":1250,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"},"pixi-foobar-0.1.0-h60d57d3_0.conda":{"arch":"arm64","build":"h60d57d3_0","build_number":0,"depends":[],"md5":"887b2da7c6e4767ac62b964324c9e1ce","name":"pixi-foobar","platform":"osx","sha256":"04775998976549e7ac47102e2face5d7fa95bbaada0498569e4a3dd3840f444d","size":1320,"subdir":"osx-arm64","timestamp":1752762372485,"version":"0.1.0"}},"repodata_version":2} \ No newline at end of file diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-a-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-a-0.1.0-h9490d1a_0.conda index 146fb5ff68..1418670555 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-a-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-a-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-b-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-b-0.1.0-h9490d1a_0.conda index b732cdd7d1..e3ab3ece9b 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-b-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-b-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-c-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-c-0.1.0-h9490d1a_0.conda index c0bf3ed09c..9f153b9c61 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-c-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-c-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-d-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-d-0.1.0-h9490d1a_0.conda index 7f7cdf5ce4..442309afe0 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-d-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-d-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-f-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-f-0.1.0-h9490d1a_0.conda index 3cf3c301a5..227585c6fd 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-f-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-f-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-g-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-g-0.1.0-h9490d1a_0.conda index 1c27307da6..81fd06a259 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy-g-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy-g-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/dummy_e-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/dummy_e-0.1.0-h9490d1a_0.conda index 12644cad48..442d1cde97 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/dummy_e-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/dummy_e-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/pixi-foobar-0.1.0-h9490d1a_0.conda b/tests/data/channels/channels/dummy_channel_1/win-64/pixi-foobar-0.1.0-h9490d1a_0.conda index 701a3fee02..713087e3fe 100644 Binary files a/tests/data/channels/channels/dummy_channel_1/win-64/pixi-foobar-0.1.0-h9490d1a_0.conda and b/tests/data/channels/channels/dummy_channel_1/win-64/pixi-foobar-0.1.0-h9490d1a_0.conda differ diff --git a/tests/data/channels/channels/dummy_channel_1/win-64/repodata.json b/tests/data/channels/channels/dummy_channel_1/win-64/repodata.json index b193f3d62d..febc406181 100644 --- a/tests/data/channels/channels/dummy_channel_1/win-64/repodata.json +++ b/tests/data/channels/channels/dummy_channel_1/win-64/repodata.json @@ -1 +1 @@ -{"info":{"subdir":"win-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-c"],"md5":"ea9f73eb2ef58136286d7c367dd58601","name":"dummy-a","platform":"win","sha256":"009251c1554fe5bc52a67dbe18222f09270785f6cf144eb241eca4268b8f2bb4","size":1327,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy-b-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"5e83fd603e6a099852a35982e719f85f","name":"dummy-b","platform":"win","sha256":"05017030acdf44985cfefef343cd0e4bc8b6384cf06a79248f491857bba7bfda","size":1158,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy-c-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"55ea0261dd813a1b1e58cdd9c0b27acd","name":"dummy-c","platform":"win","sha256":"1b664ab047d54fe69f7a79e93e0eeb417aba03c95900ba11ad61c8ddd1fc13a1","size":1159,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy-d-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-x"],"md5":"5b83aba7255b5db3f8111c053fb8e38a","name":"dummy-d","platform":"win","sha256":"b433e48409b67652d76342e4a0220df441c17b0353ce7aacd243fe9d47b10aa4","size":1175,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy-f-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"956dea0873bb6d1b1f738cb1cce49fd1","name":"dummy-f","platform":"win","sha256":"996cfb046d54c6a1053410a0dbecc92af9523409733a441b955b2f12992fc3de","size":1173,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy-g-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-b"],"md5":"7a390954301bb361f89e4aaadc0ff807","name":"dummy-g","platform":"win","sha256":"30ff5cdd0a49739f0cf24e07377859a65d85df2c865b3f7dad19a2e1ef3d6e7c","size":1186,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"dummy_e-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"9fba5ce4e0c0f7fa7598db85812e58af","name":"dummy_e","platform":"win","sha256":"e92d90411c4c03a011a295924be0b2f12eb52e4a66b5eb7233f0e2f26d403a8b","size":1158,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"},"pixi-foobar-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"247b7d4ca10b56eea5e44ce13ed8f5ff","name":"pixi-foobar","platform":"win","sha256":"fe0ff16c84835716ff40d66838c504787a168cb952e8d0e5b2c4d7dd3b99e2fc","size":1187,"subdir":"win-64","timestamp":1750924030965,"version":"0.1.0"}},"repodata_version":2} +{"info":{"subdir":"win-64"},"packages":{},"packages.conda":{"dummy-a-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-c"],"md5":"fc68526d6470ccd865b99cd84e3875b7","name":"dummy-a","platform":"win","sha256":"7176d6c0898e08d48ec0bbe32fc48c27fb1ae26d654259991460c7f4fb23c692","size":1330,"subdir":"win-64","timestamp":1752762370127,"version":"0.1.0"},"dummy-b-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"1601f2c7a2415f712b0a9500251bdd4f","name":"dummy-b","platform":"win","sha256":"25d6bbfc1dd8149b8d56274dae3ed3513ae8ed04084202077ad73bb926c088e8","size":1157,"subdir":"win-64","timestamp":1752762370127,"version":"0.1.0"},"dummy-c-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"3e6afd8bb33fe7c3ebc2e481435db95c","name":"dummy-c","platform":"win","sha256":"ffa3f2ed4d20eedd55837fffb98bf36d23adaf81fe852574863e372ae580fce1","size":1156,"subdir":"win-64","timestamp":1752762370127,"version":"0.1.0"},"dummy-d-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-x"],"md5":"85e60ca092e03b9a439c4ce32f4ae884","name":"dummy-d","platform":"win","sha256":"1bef59aedfd0c452e07af641719f0390b69dc00e0fe5176e91c979c38d1a2dc5","size":1173,"subdir":"win-64","timestamp":1752762370126,"version":"0.1.0"},"dummy-f-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"d0a7eacd1614663cab8b88a1380099d6","name":"dummy-f","platform":"win","sha256":"2074ff7664e14b9aaa877a68fd801f686125c2d5aa3fbf843cf654faceb0165b","size":1168,"subdir":"win-64","timestamp":1752762370126,"version":"0.1.0"},"dummy-g-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":["dummy-b"],"md5":"0eb4f67c2260343ba28c1aeb2c58d414","name":"dummy-g","platform":"win","sha256":"dcb8aafa138bf2c06b43ddbba1b8d0384f6798f28da2f7e25006cc8db402e667","size":1184,"subdir":"win-64","timestamp":1752762370126,"version":"0.1.0"},"dummy_e-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"7eaf9b6dfddcfb7d8c2bb90e246fa393","name":"dummy_e","platform":"win","sha256":"5ac7021b3329218a3d07f48a9e8f4a1a1a026c498027660c10a1c62a8528aaf2","size":1157,"subdir":"win-64","timestamp":1752762370126,"version":"0.1.0"},"pixi-foobar-0.1.0-h9490d1a_0.conda":{"arch":"x86_64","build":"h9490d1a_0","build_number":0,"depends":[],"md5":"11688cf09ac60987afff18c592704cf1","name":"pixi-foobar","platform":"win","sha256":"67ba5be0cda4c3e4c1516bb172e0c55a728510598d6886f67ff91e261d355256","size":1312,"subdir":"win-64","timestamp":1752762370126,"version":"0.1.0"}},"repodata_version":2} \ No newline at end of file diff --git a/tests/data/channels/recipes/dummy_channel_1.yaml b/tests/data/channels/recipes/dummy_channel_1.yaml index 12fecbd7e7..af937d1301 100644 --- a/tests/data/channels/recipes/dummy_channel_1.yaml +++ b/tests/data/channels/recipes/dummy_channel_1.yaml @@ -142,7 +142,13 @@ outputs: then: - echo "@echo off" > $PREFIX/bin/pixi-foobar.bat - echo "echo %*" >> $PREFIX/bin/pixi-foobar.bat + - mkdir -p $PREFIX/etc/conda/activate.d + - echo "@echo off" > $PREFIX/etc/conda/activate.d/script.bat + - echo "set BAR_PATH=bar" >> $PREFIX/etc/conda/activate.d/script.bat else: - echo '#!/bin/sh' > $PREFIX/bin/pixi-foobar - echo 'echo "$@"' >> $PREFIX/bin/pixi-foobar - chmod +x $PREFIX/bin/pixi-foobar + - mkdir -p $PREFIX/etc/conda/activate.d + - echo '#!/bin/sh' > $PREFIX/etc/conda/activate.d/script.sh + - echo "export BAR_PATH='bar'" >> $PREFIX/etc/conda/activate.d/script.sh diff --git a/tests/integration_python/test_run_cli.py b/tests/integration_python/test_run_cli.py index 03bfa589eb..e552757b71 100644 --- a/tests/integration_python/test_run_cli.py +++ b/tests/integration_python/test_run_cli.py @@ -18,6 +18,7 @@ import tempfile import os import tomli +import platform def test_run_in_shell_environment(pixi: Path, tmp_pixi_workspace: Path) -> None: @@ -246,7 +247,7 @@ def test_run_with_activation(pixi: Path, tmp_pixi_workspace: Path) -> None: stdout_contains="test123", ) - # Validate that without experimental it does not use the cache + # Validate that without experimental caching it does not use the cache assert not tmp_pixi_workspace.joinpath(".pixi/activation-env-v0").exists() # Enable the experimental cache config @@ -1455,6 +1456,105 @@ def test_task_caching_with_multiple_inputs_args(pixi: Path, tmp_pixi_workspace: ) +# Run with environment variable and sort the priority +# variable task.env > activation.env > activation.scripts > activation scripts of dependencies > outside environment variable +def test_run_with_environment_variable_priority( + pixi: Path, tmp_pixi_workspace: Path, dummy_channel_1: str +) -> None: + manifest = tmp_pixi_workspace.joinpath("pixi.toml") + is_windows = platform.system() == "Windows" + script_extension = ".bat" if is_windows else ".sh" + script_manifest = tmp_pixi_workspace.joinpath(f"env_setup{script_extension}") + toml = f""" + [workspace] + name = "test" + channels = ["{dummy_channel_1}"] + platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"] + [activation.env] + MY_ENV = "test123" + [target.unix.activation] + scripts = ["env_setup.sh"] + [target.win-64.activation] + scripts = ["env_setup.bat"] + [tasks.task] + cmd = "echo $MY_ENV" + env = {{ MY_ENV = "test456" }} + [tasks.foo] + cmd = "echo $MY_ENV" + [tasks.foobar] + cmd = "echo $FOO_PATH" + [tasks.bar] + cmd = "echo $BAR_PATH" + [tasks.outside] + cmd = "echo $OUTSIDE_ENV" + [dependencies] + pixi-foobar = "*" + """ + + manifest.write_text(toml) + # Generate platform-specific script content + if is_windows: + script_content = """@echo off + set "MY_ENV=activation script" + set "FOO_PATH=activation_script" + """ + else: + script_content = """#!/bin/bash + # Activation script for Unix-like systems + export MY_ENV="activation script" + export FOO_PATH="activation_script" + """ + script_manifest.write_text(script_content) + + # Test 1: task.env > activation.env - should use environment variable defined in specific tasks + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "task"], + stdout_contains="test456", + ) + + # Test 2: activation.env > activation.script - should use activation.env + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "foo"], + stdout_contains="test123", + ) + + # Test 3: activation.script > activation scripts from dependencies + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "foobar"], + stdout_contains="activation_script", + ) + + # Test 4: activation scripts from dependencies > outside environment variable + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "bar"], + stdout_contains="bar", + stdout_excludes="outside_env", + env={"BAR_PATH": "outside_env"}, + ) + + # Test 5: if nothing specified, use outside environment variable + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "outside"], + stdout_contains="outside_env", + env={"OUTSIDE_ENV": "outside_env"}, + ) + + # Test 6: activation.env > outside environment variable - should use activation.env + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "foo"], + stdout_contains="test123", + stdout_excludes="outside_env", + env={"MY_ENV": "outside_env"}, + ) + + # Test 7: task.env > outside environment variable - should use environment variable defined in specific tasks + verify_cli_command( + [pixi, "run", "--manifest-path", manifest, "task"], + stdout_contains="test456", + stdout_excludes="outside_env", + env={"MY_ENV": "outside_env"}, + ) + @pytest.mark.skipif( sys.platform == "win32", reason="Signal handling is different on Windows",