36 target_dir = (
char *)data->
args[1];
38 target_dir = home_dir;
39 if (chdir(target_dir) == -1)
41 error_message =
ft_strjoin(
"cd: ", target_dir);
50 if (getcwd(cwd,
sizeof(cwd)) != NULL)
int builtin_cd(t_ms_data *data)
void set_env(t_env **env, const char *key, const char *value)
char * get_env(t_env *envp, const char *key)
#define PERMISSION_DENIED
void exit_status_handler(t_ms_data *data, int status_code, char *err_arg)
char * ft_strjoin(char const *s1, char const *s2)