mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 03:16:51 +01:00
「🔨」 fix(env/env_init): fixed env -i
This commit is contained in:
4
src/env/env_setters.c
vendored
4
src/env/env_setters.c
vendored
@ -6,7 +6,7 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/22 14:42:52 by mmoussou #+# #+# */
|
||||
/* Updated: 2024/07/30 02:27:37 by mmoussou ### ########.fr */
|
||||
/* Updated: 2024/07/31 15:29:28 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -72,6 +72,8 @@ t_env *env_init(char **env_d)
|
||||
}
|
||||
ft_envadd_back(&env, new);
|
||||
}
|
||||
if (!env)
|
||||
env = ft_envnew(ft_strdup("PWD"), ft_strdup(ret_cwd()));
|
||||
env_edit("PWD", ft_strdup(ret_cwd()), env);
|
||||
return (env);
|
||||
}
|
||||
|
Reference in New Issue
Block a user