Skip to content

Commit

Permalink
this one?
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro-Salerno committed Nov 7, 2024
1 parent 947346e commit 7540a14
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/common/cli/directives/commands/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
#include "tm-mem.h"

int cli_cmd_remove(cli_info_t info) {
int ret = EXIT_FAILURE;
const char *pkg_name = info.input;
char *pkg_path = NULL;
const char *artifact_path = NULL;
int ret = EXIT_FAILURE;
const char *pkg_name = info.input;

if (NULL == pkg_name) {
cli_out_error("You must specify a package name for it to be removed. Use "
Expand All @@ -46,6 +44,8 @@ int cli_cmd_remove(cli_info_t info) {
goto cleanup;
}

volatile char *pkg_path = NULL;

if (0 == os_fs_tm_dypkg(&pkg_path, pkg_name)) {
cli_out_error("Unable to determine path for package");
goto cleanup;
Expand Down Expand Up @@ -77,7 +77,8 @@ int cli_cmd_remove(cli_info_t info) {
goto cleanup;
}

recipe_t recipe_artifact;
volatile const char *artifact_path = NULL;
recipe_t recipe_artifact;

if (0 != os_fs_path_dyconcat(
(char **)&artifact_path, 2, pkg_path, "recipe.tarman") &&
Expand Down

0 comments on commit 7540a14

Please sign in to comment.