diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-08 12:59:02 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-08 12:59:02 -0500 |
commit | 655f0ca987311f2947a56302741575d57fcadd74 (patch) | |
tree | 2d3d8f11d418c94fcb5fd88ae56eb5bf88c1f910 /src/main.c | |
parent | 5f7d11f1864823d5bee142b0670342da084fdbfb (diff) | |
download | stasis-655f0ca987311f2947a56302741575d57fcadd74.tar.gz |
Fix python_compact not getting updated when target python version changed
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -291,6 +291,14 @@ int main(int argc, char *argv[], char *arge[]) { exit(1); } + // Override Python version from command-line, if any + if (strlen(python_override_version)) { + guard_free(ctx.meta.python) + ctx.meta.python = strdup(python_override_version); + guard_free(ctx.meta.python_compact); + ctx.meta.python_compact = to_short_version(ctx.meta.python); + } + if (delivery_init(&ctx, ini, cfg)) { msg(OMC_MSG_ERROR | OMC_MSG_L1, "Failed to initialize delivery context\n"); exit(1); @@ -299,14 +307,6 @@ int main(int argc, char *argv[], char *arge[]) { globals.always_update_base_environment = arg_always_update_base_environment; globals.continue_on_error = arg_continue_on_error; - // Override Python version from command-line, if any - // TODO: Investigate better method to override. - // And make sure all pointers/strings are updated - if (strlen(python_override_version) && ctx.meta.python) { - guard_free(ctx.meta.python) - ctx.meta.python = strdup(python_override_version); - } - msg(OMC_MSG_L2, "Configuring JFrog CLI\n"); if (delivery_init_artifactory(&ctx)) { msg(OMC_MSG_ERROR | OMC_MSG_L2, "JFrog CLI configuration failed\n"); |