Fixed install-program executable

This commit is contained in:
Brian Zalewski 2023-08-09 02:12:46 -04:00 committed by GitHub
parent b7684d635a
commit fa083de2ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -859,8 +859,8 @@ async function ensurePackageManagerAnsible() {
await $`pipx inject ansible-core PyObjC PyObjC-core` await $`pipx inject ansible-core PyObjC PyObjC-core`
} }
await $`pipx inject ansible-core docker lxml netaddr pexpect python-vagrant pywinrm requests-credssp watchdog` await $`pipx inject ansible-core docker lxml netaddr pexpect python-vagrant pywinrm requests-credssp watchdog`
await $`mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs"` await $`mkdir -p "$HOME/.cache/megabyte-labs"`
await $`touch "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/ansible-installed"` await $`touch "$HOME/.cache/megabyte-labs/ansible-installed"`
log('info', 'Package Manager Install', `Ansible and its supporting packages are now installed via pipx`) log('info', 'Package Manager Install', `Ansible and its supporting packages are now installed via pipx`)
} }
@ -896,7 +896,7 @@ async function ensurePackageManager(packageManager) {
} }
} else if (packageManager === 'ansible') { } else if (packageManager === 'ansible') {
try { try {
await $`test -f "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/ansible-installed"` await $`test -f "$HOME/.cache/megabyte-labs/ansible-installed"`
const ansible = which.sync('ansible', { nothrow: true }) const ansible = which.sync('ansible', { nothrow: true })
if (ansible) { if (ansible) {
log('info', logStage, `\`ansible\` and its supporting packages appear to be installed`) log('info', logStage, `\`ansible\` and its supporting packages appear to be installed`)