fix: Export the environment prefix in specification (#3562)

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
This commit is contained in:
Julien Jerphanion 2024-10-22 15:20:21 +02:00 committed by GitHub
parent 651622b72d
commit dfcc7c0bf1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -187,7 +187,7 @@ set_env_command(CLI::App* com, Configuration& config)
if (from_history)
{
dependencies << "- " << requested_specs_map[k].str() << "\n";
dependencies << " - " << requested_specs_map[k].str() << "\n";
}
else
{
@ -222,6 +222,9 @@ set_env_command(CLI::App* com, Configuration& config)
std::cout << "- " << c << "\n";
}
std::cout << "dependencies:\n" << dependencies.str() << std::endl;
std::cout << "prefix: " << ctx.prefix_params.target_prefix << std::endl;
std::cout.flush();
}
}

View File

@ -83,6 +83,7 @@ def test_env_export(export_env, explicit_flag, md5_flag, channel_subdir_flag):
else:
ret = yaml.safe_load(output)
assert ret["name"] == export_env
assert "env-create-export" in ret["prefix"]
assert set(ret["channels"]) == {"conda-forge"}
assert "micromamba=0.24.0=0" in str(ret["dependencies"])
if md5_flag == "--md5":