From 425e59b2e430fb5715fb943a8b64bbb867ee823b Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 21 May 2019 23:50:15 -0400 Subject: Clean up a little --- source/conda.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/conda.d') 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) { -- cgit