From d892b5624be050469b804591420d8f13ca381891 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Fri, 2 Dec 2022 16:55:33 +0000 Subject: [PATCH] Update .local/share/chezmoi/home/dot_local/bin/executable_install-program, .local/bin/install-program --- .local/bin/install-program | 6 +++--- .../chezmoi/home/dot_local/bin/executable_install-program | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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' } }