Update .local/share/chezmoi/home/dot_local/bin/executable_install-program, .local/bin/install-program
This commit is contained in:
parent
476c78748f
commit
01fcece369
2 changed files with 45 additions and 15 deletions
|
@ -242,6 +242,29 @@ async function beforeInstall(packageManager) {
|
|||
} else if (packageManager === 'flatpak') {
|
||||
} else if (packageManager === 'snap') {
|
||||
} else if (packageManager === 'whalebrew') {
|
||||
if (osType === 'darwin') {
|
||||
const docker = await which('docker')
|
||||
if (!docker) {
|
||||
await $`brew install --cask docker`
|
||||
}
|
||||
try {
|
||||
await $`docker run --rm hello-world`
|
||||
} catch (e) {
|
||||
await $`logg warn 'The command \`docker run --rm hello-world\` failed`
|
||||
try {
|
||||
await $`test -f /Applications/Docker.app`
|
||||
await $`logg info 'Attempting to open \`Applications/Docker.app\` (Docker Desktop for macOS). This should take about 30 seconds.'`
|
||||
const gum = await which('gum')
|
||||
if (gum) {
|
||||
await $`gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30`
|
||||
} else {
|
||||
await $`sleep 30`
|
||||
}
|
||||
} catch (e) {
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!`
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (packageManager === 'winget') {
|
||||
} else if (packageManager === 'yay') {
|
||||
} else if (packageManager === 'zypper') {
|
||||
|
|
|
@ -242,21 +242,28 @@ async function beforeInstall(packageManager) {
|
|||
} else if (packageManager === 'flatpak') {
|
||||
} else if (packageManager === 'snap') {
|
||||
} else if (packageManager === 'whalebrew') {
|
||||
if (osType === 'darwin') {
|
||||
await $`
|
||||
if ! docker run --rm hello-world; then
|
||||
logg warn 'The command `docker run --rm hello-world` failed'
|
||||
if [ -f '/Applications/Docker.app' ]; then
|
||||
logg info 'Attempting to open `Applications/Docker.app` (Docker Desktop for macOS)'
|
||||
open /Applications/Docker.app
|
||||
if command -v gum > /dev/null; then
|
||||
gum spin --spinner dot --title "Waiting for Docker Desktop to open and start the Docker daemon" -- sleep 30
|
||||
else
|
||||
sleep 30
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
`
|
||||
if (osType === 'darwin') {
|
||||
const docker = await which('docker')
|
||||
if (!docker) {
|
||||
await $`brew install --cask docker`
|
||||
}
|
||||
try {
|
||||
await $`docker run --rm hello-world`
|
||||
} catch (e) {
|
||||
await $`logg warn 'The command \`docker run --rm hello-world\` failed`
|
||||
try {
|
||||
await $`test -f /Applications/Docker.app`
|
||||
await $`logg info 'Attempting to open \`Applications/Docker.app\` (Docker Desktop for macOS). This should take about 30 seconds.'`
|
||||
const gum = await which('gum')
|
||||
if (gum) {
|
||||
await $`gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30`
|
||||
} else {
|
||||
await $`sleep 30`
|
||||
}
|
||||
} catch (e) {
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!`
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (packageManager === 'winget') {
|
||||
} else if (packageManager === 'yay') {
|
||||
|
|
Loading…
Reference in a new issue