diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-04-02 14:49:33 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-04-02 14:49:33 -0400 |
commit | 27bd4bf8abd7e9a29ca89f67503fd9291757a97b (patch) | |
tree | f963b3776ee7f1b4dca399a41dbc2f1222c6c694 /src/cli/stasis/stasis_main.c | |
parent | e817b38090defab01e64bc3516ea474215bfcb09 (diff) | |
download | stasis-27bd4bf8abd7e9a29ca89f67503fd9291757a97b.tar.gz |
base and "based_on" installations shall hardcode the requested python version in the YAML config instead of trusting it
Diffstat (limited to 'src/cli/stasis/stasis_main.c')
-rw-r--r-- | src/cli/stasis/stasis_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cli/stasis/stasis_main.c b/src/cli/stasis/stasis_main.c index 36dfecc..7f0b88a 100644 --- a/src/cli/stasis/stasis_main.c +++ b/src/cli/stasis/stasis_main.c @@ -325,9 +325,6 @@ int main(int argc, char *argv[]) { exit(1); } copy2(mission_base_orig, mission_base, CT_OWNER | CT_PERM); - char spec[255] = {0}; - snprintf(spec, sizeof(spec) - 1, "- python=%s\n", ctx.meta.python); - file_replace_text(mission_base, "- python\n", spec, 0); ctx.meta.based_on = mission_base; } guard_free(mission_base_orig); @@ -340,7 +337,7 @@ int main(int argc, char *argv[]) { } msg(STASIS_MSG_L2, "Based on: %s\n", ctx.meta.based_on); - if (conda_env_create_from_uri(env_name, ctx.meta.based_on)) { + if (conda_env_create_from_uri(env_name, ctx.meta.based_on, ctx.meta.python)) { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "unable to install release environment using configuration file\n"); exit(1); } @@ -349,7 +346,7 @@ int main(int argc, char *argv[]) { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "failed to remove testing environment %s\n", env_name_testing); exit(1); } - if (conda_env_create_from_uri(env_name_testing, ctx.meta.based_on)) { + if (conda_env_create_from_uri(env_name_testing, ctx.meta.based_on, ctx.meta.python)) { msg(STASIS_MSG_ERROR | STASIS_MSG_L2, "unable to install testing environment using configuration file\n"); exit(1); } |