Update .local/bin/install-program, .local/share/chezmoi/home/dot_local/bin/executable_install-program
This commit is contained in:
parent
01fcece369
commit
bc099cca12
2 changed files with 15 additions and 15 deletions
|
@ -243,25 +243,25 @@ async function beforeInstall(packageManager) {
|
|||
} else if (packageManager === 'snap') {
|
||||
} else if (packageManager === 'whalebrew') {
|
||||
if (osType === 'darwin') {
|
||||
const docker = await which('docker')
|
||||
const docker = which.sync('docker', { nothrow: true })
|
||||
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`
|
||||
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')
|
||||
const promises = [$`test -d /Applications/Docker.app`, $`logg info 'Attempting to open \`/Applications/Docker.app\` (Docker Desktop for macOS). This should take about 30 seconds.'`, $`open /Applications/Docker.app`]
|
||||
await Promise.all(promises)
|
||||
const gum = which.sync('gum', { nothrow: true })
|
||||
if (gum) {
|
||||
await $`gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30`
|
||||
execSync('gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30', {stdio: 'inherit', shell: true})
|
||||
} else {
|
||||
await $`sleep 30`
|
||||
}
|
||||
} catch (e) {
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!`
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!'`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,25 +243,25 @@ async function beforeInstall(packageManager) {
|
|||
} else if (packageManager === 'snap') {
|
||||
} else if (packageManager === 'whalebrew') {
|
||||
if (osType === 'darwin') {
|
||||
const docker = await which('docker')
|
||||
const docker = which.sync('docker', { nothrow: true })
|
||||
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`
|
||||
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')
|
||||
const promises = [$`test -d /Applications/Docker.app`, $`logg info 'Attempting to open \`/Applications/Docker.app\` (Docker Desktop for macOS). This should take about 30 seconds.'`, $`open /Applications/Docker.app`]
|
||||
await Promise.all(promises)
|
||||
const gum = which.sync('gum', { nothrow: true })
|
||||
if (gum) {
|
||||
await $`gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30`
|
||||
execSync('gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30', {stdio: 'inherit', shell: true})
|
||||
} else {
|
||||
await $`sleep 30`
|
||||
}
|
||||
} catch (e) {
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!`
|
||||
await $`logg warn 'Docker Desktop appears to not be installed!'`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue