aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-15 16:39:58 +0100
committerDominik Kaiser2025-01-15 16:39:58 +0100
commit348f46d8ad351f83821831ec997fec91aee43d5c (patch)
treeb55d14b4951f583b17d777c6ad90e215ce3f4fb1
parent1d0c010ad0634e5fba061b91bec0b0f2badc293c (diff)
downloadminishell-348f46d8ad351f83821831ec997fec91aee43d5c.tar.gz
minishell-348f46d8ad351f83821831ec997fec91aee43d5c.zip
Fix wrong error code
-rw-r--r--src/get_cmd_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/get_cmd_path.c b/src/get_cmd_path.c
index 7c5e103..543540b 100644
--- a/src/get_cmd_path.c
+++ b/src/get_cmd_path.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/17 19:19:59 by chuhlig #+# #+# */
-/* Updated: 2025/01/15 16:37:18 by dkaiser ### ########.fr */
+/* Updated: 2025/01/15 16:38:39 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -98,7 +98,7 @@ static char *get_simple_cmd_path(char *cmd, int *return_code)
if (access(result, F_OK) == -1)
{
free(result);
- return (error(EACCES, cmd, 127, return_code));
+ return (error(ENOENT, cmd, 127, return_code));
}
else if (access(result, X_OK) == -1)
{