diff --git a/.local/bin/install-program b/.local/bin/install-program index d5fe45be..fe963c59 100644 --- a/.local/bin/install-program +++ b/.local/bin/install-program @@ -139,10 +139,10 @@ async function OSTypeInstallerKey() { } else if (freebsd) { return 'freebsd' } else { - const macOS = await $`test -d /Applications && test -d Library` - if (macOS.exitCode === 0) { + try { + await $`test -d /Applications && test -d /Library` return 'darwin' - } else { + } catch (e) { return 'windows' } } diff --git a/.local/share/chezmoi/home/dot_local/bin/executable_install-program b/.local/share/chezmoi/home/dot_local/bin/executable_install-program index 50cad212..0fa854aa 100644 --- a/.local/share/chezmoi/home/dot_local/bin/executable_install-program +++ b/.local/share/chezmoi/home/dot_local/bin/executable_install-program @@ -139,10 +139,10 @@ async function OSTypeInstallerKey() { } else if (freebsd) { return 'freebsd' } else { - const macOS = await $`test -d /Applications && test -d Library` - if (macOS.exitCode === 0) { + try { + await $`test -d /Applications && test -d /Library` return 'darwin' - } else { + } catch (e) { return 'windows' } }