Updated exit commands
This commit is contained in:
parent
a7b76e7579
commit
4caaf07b09
2 changed files with 5 additions and 5 deletions
|
@ -48,7 +48,7 @@ $cli
|
||||||
if (null !== $path && !\file_exists(\dirname($path))) {
|
if (null !== $path && !\file_exists(\dirname($path))) {
|
||||||
if (!@\mkdir(\dirname($path), 0755, true)) {
|
if (!@\mkdir(\dirname($path), 0755, true)) {
|
||||||
Console::error('Can\'t create directory '.\dirname($path));
|
Console::error('Can\'t create directory '.\dirname($path));
|
||||||
exit(1);
|
Console::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,12 +139,12 @@ $cli
|
||||||
|
|
||||||
if(!file_put_contents($path.'/docker-compose.yml', $templateForCompose->render(false))) {
|
if(!file_put_contents($path.'/docker-compose.yml', $templateForCompose->render(false))) {
|
||||||
Console::error('Failed to save Docker Compose file');
|
Console::error('Failed to save Docker Compose file');
|
||||||
exit(1);
|
Console::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_put_contents($path.'/.env', $templateForEnv->render(false))) {
|
if(!file_put_contents($path.'/.env', $templateForEnv->render(false))) {
|
||||||
Console::error('Failed to save environment variables file');
|
Console::error('Failed to save environment variables file');
|
||||||
exit(1);
|
Console::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$stdout = '';
|
$stdout = '';
|
||||||
|
@ -157,7 +157,7 @@ $cli
|
||||||
if ($exit !== 0) {
|
if ($exit !== 0) {
|
||||||
Console::error("Failed to install Appwrite dockers");
|
Console::error("Failed to install Appwrite dockers");
|
||||||
Console::error($stderr);
|
Console::error($stderr);
|
||||||
exit($exit);
|
Console::exit($exit);
|
||||||
} else {
|
} else {
|
||||||
Console::success("Appwrite installed successfully");
|
Console::success("Appwrite installed successfully");
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,5 +215,5 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit();
|
Console::exit();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue