Merge: manage errors with command from path
This commit is contained in:
commit
1f0887e7db
2 changed files with 6 additions and 2 deletions
1
dev/TODO
1
dev/TODO
|
@ -2,7 +2,6 @@
|
|||
- '<<' with history?
|
||||
- finding commands
|
||||
- built-in commands
|
||||
- relative/absolute paths
|
||||
- signals
|
||||
- ^C, ^D, ^\
|
||||
- variables
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/16 12:07:26 by jschaft #+# #+# */
|
||||
/* Updated: 2024/05/01 17:53:38 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/07 11:40:04 by jschaft ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -34,6 +34,11 @@ const char *search_path(
|
|||
const char *r;
|
||||
|
||||
i = 0;
|
||||
if (access(prog, X_OK) >= 0)
|
||||
{
|
||||
mem_free((void *)prog2);
|
||||
return (ft_strdup(prog));
|
||||
}
|
||||
while (path[i] != NULL)
|
||||
{
|
||||
r = str_join(fatal_error, mc, path[i], prog2);
|
||||
|
|
Loading…
Add table
Reference in a new issue