From a490efb4d45b2521cd97d9838728bae4ec0d3dcc Mon Sep 17 00:00:00 2001 From: ali asaria <ali.asaria@gmail.com> Date: Tue, 5 Mar 2024 10:31:46 -0500 Subject: [PATCH] installers run without shell only --- src/main/util.ts | 10 ++++----- .../components/Connect/LocalConnection.tsx | 21 ++++++++++++++++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/main/util.ts b/src/main/util.ts index db58b94b..a1e15975 100644 --- a/src/main/util.ts +++ b/src/main/util.ts @@ -202,7 +202,7 @@ export async function executeInstallStep( argument: string, useLocalInstallSh = false ) { - const options = { shell: '/bin/bash' }; + const options = {}; console.log('Running install.sh ' + argument); if (useLocalInstallSh) { @@ -215,8 +215,8 @@ export async function executeInstallStep( ).catch((err) => { console.log('Error running install.sh', err); }); - console.log('stdout:', stdout); - console.error('stderr:', stderr); + if (stdout) console.log('stdout:', stdout); + if (stderr) console.error('stderr:', stderr); } else { const { stdout, stderr } = await awaitExec( `curl https://raw.githubusercontent.com/transformerlab/transformerlab-api/main/install.sh | bash -s -- ${argument}`, @@ -224,7 +224,7 @@ export async function executeInstallStep( ).catch((err) => { console.log('Error running install.sh', err); }); - console.log('stdout:', stdout); - console.error('stderr:', stderr); + if (stdout) console.log('stdout:', stdout); + if (stderr) console.error('stderr:', stderr); } } diff --git a/src/renderer/components/Connect/LocalConnection.tsx b/src/renderer/components/Connect/LocalConnection.tsx index 05c533c7..999ba816 100644 --- a/src/renderer/components/Connect/LocalConnection.tsx +++ b/src/renderer/components/Connect/LocalConnection.tsx @@ -452,7 +452,12 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) { <> <Stack spacing={1}> {installStatus == 'success' && <Chip color="success">Success!</Chip>} - {installStatus == 'pending' && <CircularProgress color="primary" />} + {installStatus == 'pending' && ( + <> + <CircularProgress color="primary" /> Installing. This can take a + while. + </> + )} {activeStep == Steps.indexOf('CHECK_IF_CONDA_INSTALLED') && installStatus == 'notstarted' && ( @@ -530,7 +535,12 @@ function CheckIfCondaEnvironmentExists({ activeStep, setActiveStep }) { <> <Stack spacing={1}> {installStatus == 'success' && <Chip color="success">Success!</Chip>} - {installStatus == 'pending' && <CircularProgress color="primary" />} + {installStatus == 'pending' && ( + <> + <CircularProgress color="primary" /> + Installing. This can take a while. + </> + )} {activeStep == Steps.indexOf('CHECK_IF_CONDA_ENVIRONMENT_EXISTS') && installStatus == 'notstarted' && ( @@ -612,7 +622,12 @@ function CheckDependencies({ activeStep, setActiveStep }) { <> <Stack spacing={1}> {installStatus == 'success' && <Chip color="success">Success!</Chip>} - {installStatus == 'pending' && <CircularProgress color="primary" />} + {installStatus == 'pending' && ( + <> + <CircularProgress color="primary" /> + Installing. This can take a <b>long</b> while. + </> + )} {missingDependencies.length > 0 && installStatus == 'notstarted' && ( <Typography level="body-sm" color="warning"> Many dependencies are missing including:{' '} -- GitLab