@@ -55,11 +55,11 @@ namespace mamba
55
55
// if ../miniconda3/envs/my_super_env, return `my_super_env`, else path
56
56
if (prefix.parent_path ().stem () == " envs" )
57
57
{
58
- return prefix.stem ();
58
+ return prefix.stem (). string () ;
59
59
}
60
60
else
61
61
{
62
- return prefix;
62
+ return prefix. string () ;
63
63
}
64
64
}
65
65
@@ -162,8 +162,8 @@ namespace mamba
162
162
std::string prompt = Context::instance ().env_prompt ;
163
163
replace_all (prompt, " {default_env}" , conda_default_env);
164
164
replace_all (prompt, " {stacked_env}" , conda_stacked_env);
165
- replace_all (prompt, " {prefix}" , prefix);
166
- replace_all (prompt, " {name}" , prefix.stem ());
165
+ replace_all (prompt, " {prefix}" , prefix. string () );
166
+ replace_all (prompt, " {name}" , prefix.stem (). string () );
167
167
return prompt;
168
168
}
169
169
else
@@ -268,7 +268,7 @@ namespace mamba
268
268
bool no_condabin
269
269
= std::none_of (path_list.begin (),
270
270
path_list.end (),
271
- [](const std::string & s) { return ends_with (s, " condabin" ); });
271
+ [](const fs::path & s) { return ends_with (s. string () , " condabin" ); });
272
272
if (no_condabin)
273
273
{
274
274
auto condabin_dir = Context::instance ().root_prefix / " condabin" ;
@@ -282,7 +282,7 @@ namespace mamba
282
282
final_path.insert (final_path.end (), path_list.begin (), path_list.end ());
283
283
final_path.erase (std::unique (final_path.begin (), final_path.end ()), final_path.end ());
284
284
285
- std::string result = join (env::pathsep (), final_path);
285
+ std::string result = join (env::pathsep (), final_path). string () ;
286
286
return result;
287
287
}
288
288
@@ -325,14 +325,14 @@ namespace mamba
325
325
326
326
// remove duplicates
327
327
final_path.erase (std::unique (final_path.begin (), final_path.end ()), final_path.end ());
328
- std::string result = join (env::pathsep (), final_path);
328
+ std::string result = join (env::pathsep (), final_path). string () ;
329
329
return result;
330
330
}
331
331
else
332
332
{
333
333
current_path.erase (std::unique (current_path.begin (), current_path.end ()),
334
334
current_path.end ());
335
- std::string result = join (env::pathsep (), current_path);
335
+ std::string result = join (env::pathsep (), current_path). string () ;
336
336
return result;
337
337
}
338
338
}
@@ -602,16 +602,15 @@ namespace mamba
602
602
LOG_WARNING << " Overwriting variables: " << join (" ," , clobbering_env_vars);
603
603
}
604
604
605
- std::vector<std::pair<std::string, std::string>> env_vars_to_export;
606
- std::vector<std::string> unset_vars;
607
-
608
605
std::string new_path = add_prefix_to_path (prefix, old_conda_shlvl);
609
606
610
- env_vars_to_export = { { " path" , std::string (new_path) },
611
- { " conda_prefix" , std::string (prefix) },
612
- { " conda_shlvl" , std::to_string (new_conda_shlvl) },
613
- { " conda_default_env" , conda_default_env },
614
- { " conda_prompt_modifier" , conda_prompt_modifier } };
607
+ std::vector<std::pair<std::string, std::string>> env_vars_to_export{
608
+ { " path" , new_path },
609
+ { " conda_prefix" , prefix.string () },
610
+ { " conda_shlvl" , std::to_string (new_conda_shlvl) },
611
+ { " conda_default_env" , conda_default_env },
612
+ { " conda_prompt_modifier" , conda_prompt_modifier }
613
+ };
615
614
616
615
for (auto & [k, v] : conda_environment_env_vars)
617
616
{
@@ -634,7 +633,7 @@ namespace mamba
634
633
}
635
634
else
636
635
{
637
- new_path = replace_prefix_in_path (old_conda_prefix, prefix);
636
+ new_path = replace_prefix_in_path (old_conda_prefix, prefix. string () );
638
637
envt.deactivate_scripts = get_deactivate_scripts (old_conda_prefix);
639
638
env_vars_to_export[0 ] = { " PATH" , new_path };
640
639
get_export_unset_vars (envt, env_vars_to_export);
0 commit comments