mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
install: rewrite caddyfile if not exist
This commit is contained in:
1 file changed
+3
-2
+3
-2
@@ -305,7 +305,7 @@ const Steps = () => [
|
||||
{
|
||||
init: 'install.preparing',
|
||||
operations: [
|
||||
() => {
|
||||
async () => {
|
||||
if (process.env.IGNORE_BT) return;
|
||||
const res = exec('bt default');
|
||||
if (!res.code) {
|
||||
@@ -314,6 +314,7 @@ const Steps = () => [
|
||||
process.exit(1);
|
||||
} else {
|
||||
log.warn('warn.bt');
|
||||
await sleep(5000);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -407,7 +408,7 @@ ${nixConfBase}`);
|
||||
},
|
||||
{
|
||||
init: 'install.caddy',
|
||||
skip: () => !exec('caddy version').code || installAsJudge || noCaddy,
|
||||
skip: () => !exec('caddy version').code || installAsJudge || noCaddy || !existsSync(`${process.env.HOME}/.hydro/Caddyfile`),
|
||||
hidden: installAsJudge,
|
||||
operations: [
|
||||
'nix-env -iA nixpkgs.caddy',
|
||||
|
||||
Reference in new issue
Block a user