merged from master!

This commit is contained in:
Maix0 2024-05-10 21:44:35 +02:00
commit b4c6aed6c4
15 changed files with 210 additions and 19 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/03 16:22:41 by maiboyer #+# #+# */
/* Updated: 2024/04/30 21:17:22 by maiboyer ### ########.fr */
/* Updated: 2024/05/09 16:55:16 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -84,6 +84,8 @@ t_error find_binary(t_spawn_info *info, t_process *process)
t_buffer_str s;
(void)(process);
if (info->binary_path == NULL)
return (ERROR);
s = alloc_new_buffer(256);
if (str_start_with(info->binary_path, "/")
|| str_find_chr(info->binary_path, '/') != NULL)

View file

@ -6,11 +6,12 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 22:25:44 by maiboyer #+# #+# */
/* Updated: 2024/01/04 22:26:10 by maiboyer ### ########.fr */
/* Updated: 2024/05/09 16:57:24 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/types.h"
#include <stdbool.h>
bool find_null(const t_str *s)
{
@ -29,5 +30,7 @@ bool str_start_with(t_const_str s, t_const_str prefix)
bool find_path(const t_str *s)
{
if (*s == NULL)
return (false);
return (str_start_with(*s, "PATH="));
}