app: dont advance on error
This commit is contained in:
parent
dc642aa07d
commit
c48f07f821
2 changed files with 10 additions and 10 deletions
|
@ -51,10 +51,15 @@ export default function () {
|
||||||
<div className='mx-auto'>
|
<div className='mx-auto'>
|
||||||
<button
|
<button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await install()
|
try {
|
||||||
getCurrentWindow().show()
|
await install()
|
||||||
getCurrentWindow().focus()
|
setStep(Step.FINISH)
|
||||||
setStep(Step.FINISH)
|
} catch (e) {
|
||||||
|
console.error('could not install: ', e)
|
||||||
|
} finally {
|
||||||
|
getCurrentWindow().show()
|
||||||
|
getCurrentWindow().focus()
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
className='no-drag rounded-dm mx-auto w-[60%] rounded-md bg-black px-4 py-2 text-sm text-white hover:brightness-110'
|
className='no-drag rounded-dm mx-auto w-[60%] rounded-md bg-black px-4 py-2 text-sm text-white hover:brightness-110'
|
||||||
>
|
>
|
||||||
|
|
|
@ -17,10 +17,5 @@ export async function install() {
|
||||||
symlinkPath
|
symlinkPath
|
||||||
)} && ln -F -s ${ollama} ${symlinkPath}" with administrator privileges`
|
)} && ln -F -s ${ollama} ${symlinkPath}" with administrator privileges`
|
||||||
|
|
||||||
try {
|
await exec(`osascript -e '${command}'`)
|
||||||
await exec(`osascript -e '${command}'`)
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`cli: failed to install cli: ${error.message}`)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue