mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2026-10-16 03:10:07 +02:00
「🔨」 fix(env/env_init): fixed env -i
This commit is contained in:
1 parent
a7b1a74543
commit
c7cdcf4f9a
1 file changed
+3
-1
Vendored
+3
-1
@@ -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