aboutsummaryrefslogtreecommitdiff
path: root/src/conda.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conda.c')
-rw-r--r--src/conda.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/conda.c b/src/conda.c
index 0d3e0da..f18d2d1 100644
--- a/src/conda.c
+++ b/src/conda.c
@@ -111,7 +111,6 @@ int conda_activate(const char *root, const char *env_name) {
perror(logfile);
return -1;
}
- static char buf[1024];
int i = 0;
while (!feof(fp)) {
char buf[BUFSIZ] = {0};
@@ -153,6 +152,21 @@ int conda_activate(const char *root, const char *env_name) {
return 0;
}
+void conda_setup_headless() {
+ // Configure conda for headless CI
+ conda_exec("config --system --set auto_update_conda false");
+ conda_exec("config --system --set always_yes true");
+ conda_exec("config --system --set quiet true");
+ conda_exec("config --system --set rollback_enabled false");
+ conda_exec("config --system --set report_errors false");
+
+ // make this configurable
+ //if (conda_exec("update --all")) {
+ // fprintf(stderr, "conda update was unsuccessful\n");
+ // exit(1);
+ //}
+}
+
void conda_env_create_from_uri(char *name, char *uri) {
char env_command[PATH_MAX];
sprintf(env_command, "env create -n %s -f %s", name, uri);