mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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',
|
init: 'install.preparing',
|
||||||
operations: [
|
operations: [
|
||||||
() => {
|
async () => {
|
||||||
if (process.env.IGNORE_BT) return;
|
if (process.env.IGNORE_BT) return;
|
||||||
const res = exec('bt default');
|
const res = exec('bt default');
|
||||||
if (!res.code) {
|
if (!res.code) {
|
||||||
@@ -314,6 +314,7 @@ const Steps = () => [
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else {
|
||||||
log.warn('warn.bt');
|
log.warn('warn.bt');
|
||||||
|
await sleep(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -407,7 +408,7 @@ ${nixConfBase}`);
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
init: 'install.caddy',
|
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,
|
hidden: installAsJudge,
|
||||||
operations: [
|
operations: [
|
||||||
'nix-env -iA nixpkgs.caddy',
|
'nix-env -iA nixpkgs.caddy',
|
||||||
|
|||||||
Reference in new issue
Block a user