aboutsummaryrefslogtreecommitdiff
path: root/source/conda.d
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-05-21 23:50:15 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-05-21 23:50:15 -0400
commit425e59b2e430fb5715fb943a8b64bbb867ee823b (patch)
treea44e7e5943af3edcae44f0619b96b4112eaa7e7c /source/conda.d
parentfaa81e94ae2930a794e1ab1bab320b33e206abeb (diff)
downloaddm-425e59b2e430fb5715fb943a8b64bbb867ee823b.tar.gz
Clean up a little
Diffstat (limited to 'source/conda.d')
-rw-r--r--source/conda.d6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/conda.d b/source/conda.d
index 6dc66e6..6ebb2bf 100644
--- a/source/conda.d
+++ b/source/conda.d
@@ -15,9 +15,9 @@ static auto getenv(string[string] base=null, string preface=null) {
string[string] env;
string cmd = "env";
+ // Execute a command before dumping the environment
if (preface !is null) {
cmd = preface ~ " && " ~ cmd;
- writeln("preface: " ~ cmd);
}
auto env_sh = executeShell(cmd, env=base);
@@ -260,6 +260,10 @@ class Conda {
return result;
}
+ bool env_exists(string name) {
+ return buildPath(this.install_prefix, "envs", name).exists;
+ }
+
string dump_env_yaml(string filename=null) {
string args;
if (filename !is null) {