mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 11:26:51 +01:00
「🔨」 fix: fixed some things.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/06/01 14:55:06 by mmoussou #+# #+# */
|
/* Created: 2024/06/01 14:55:06 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/07/18 14:31:46 by mmoussou ### ########.fr */
|
/* Updated: 2024/07/21 12:58:49 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -52,6 +52,12 @@ int exec_single_cmd(t_cmd *cmd, char **env, t_env *env_t, int pipe_fd[2])
|
|||||||
t_exec exec;
|
t_exec exec;
|
||||||
char *input;
|
char *input;
|
||||||
|
|
||||||
|
if (!cmd->cmd)
|
||||||
|
{
|
||||||
|
free(cmd->argv);
|
||||||
|
get_exit_code(0);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
input = ft_strdup(cmd->cmd);
|
input = ft_strdup(cmd->cmd);
|
||||||
exec.pipe_fd[0] = pipe_fd[0];
|
exec.pipe_fd[0] = pipe_fd[0];
|
||||||
exec.pipe_fd[1] = pipe_fd[1];
|
exec.pipe_fd[1] = pipe_fd[1];
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/07/03 10:50:52 by mmoussou #+# #+# */
|
/* Created: 2024/07/03 10:50:52 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/07/17 00:37:25 by mmoussou ### ########.fr */
|
/* Updated: 2024/07/21 13:07:26 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -49,8 +49,8 @@ int format_quotes_cmd(t_cmd *cmd)
|
|||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
if (!cmd)
|
if (!cmd || !cmd->cmd)
|
||||||
return (-1);
|
return (0);
|
||||||
cmd->cmd = format_quotes_string(cmd->cmd);
|
cmd->cmd = format_quotes_string(cmd->cmd);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (cmd->argv[i])
|
while (cmd->argv[i])
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/04/24 11:18:04 by adjoly #+# #+# */
|
/* Created: 2024/04/24 11:18:04 by adjoly #+# #+# */
|
||||||
/* Updated: 2024/07/18 16:58:27 by adjoly ### ########.fr */
|
/* Updated: 2024/07/21 13:09:17 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user