CE change environment variables syntax, sdutil Add help command
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 3m26s
Build documentation / build-and-deploy (push) Successful in 3m14s

This commit is contained in:
2026-03-27 22:31:32 +01:00
parent 2d7f019844
commit 69f063198a
3 changed files with 19 additions and 9 deletions

View File

@@ -424,20 +424,24 @@ static void execute_cmd (struct ast_cmd* cmd, struct context* context) {
int pgid = get_procgroup (pid);
for (int i = 0; i < cmd->arg_count; i++) {
int i = 0;
while (i < cmd->arg_count) {
char* arg = cmd->args[i];
char *key, *value;
char* sep = strchr (arg, '=');
if (arg[0] == '-') {
key = &arg[1];
if (sep != NULL) {
*sep = '\0';
key = arg;
value = sep + 1;
if (i < cmd->arg_count - 1) {
value = cmd->args[++i];
} else {
value = "yes";
}
env_set (pgid, key, value, strlen (value) + 1);
}
i++;
}
struct cmd_write_proc_ctx wpctx = {.pgid = pgid, .cancel_pid = pid};