sh: Remove stray variable
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
00832163d4
commit
b7a0ad8ffb
@ -69,8 +69,6 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
|
|
||||||
if (!strncmp(cmd.chars(), "cd", 2))
|
if (!strncmp(cmd.chars(), "cd", 2))
|
||||||
{
|
{
|
||||||
char* copy = nullptr;
|
|
||||||
|
|
||||||
auto args = TRY(split_command_into_args(cmd.view()));
|
auto args = TRY(split_command_into_args(cmd.view()));
|
||||||
check(args[0].view() == "cd");
|
check(args[0].view() == "cd");
|
||||||
|
|
||||||
@ -78,12 +76,10 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
auto home = TRY(os::FileSystem::home_directory());
|
auto home = TRY(os::FileSystem::home_directory());
|
||||||
if (chdir(home.chars()) < 0) perror("cd");
|
if (chdir(home.chars()) < 0) perror("cd");
|
||||||
free(copy);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chdir(args[1].chars()) < 0) perror("cd");
|
if (chdir(args[1].chars()) < 0) perror("cd");
|
||||||
free(copy);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user