From 9b21ceecc6093a97d40f39bd34e2c3896d963c75 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Sat, 1 Jun 2024 15:42:25 +0200 Subject: [PATCH] Update index.tsx --- documentation/src/pages/install/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/documentation/src/pages/install/index.tsx b/documentation/src/pages/install/index.tsx index 98f541b5..f790fab4 100644 --- a/documentation/src/pages/install/index.tsx +++ b/documentation/src/pages/install/index.tsx @@ -55,15 +55,16 @@ const Install: React.FC = () => { })); }; + const generateInstallCommand = () => { let command = "bash <(curl -sSL https://get.openpanel.co/)"; for (const option in installOptions) { if (option !== "version" || (option === "version" && installOptions[option].value !== latestVersion)) { - if (installOptions[option].value !== "") { + if (installOptions[option].value) { if (option === "screenshots" && installOptions[option].value === "local") { command += ` --screenshots=local`; - } else if (option !== "screenshots") { - command += ` --${option}${installOptions[option].value === true ? '' : `=${installOptions[option].value}`}`; + } else { + command += ` --${option.replace(/-/g, '_')}`; } } } @@ -71,6 +72,7 @@ const Install: React.FC = () => { return command; }; + return (