diff --git a/scripts/Arch/lib/deploy.fish b/scripts/Arch/lib/deploy.fish index ee872b86..4d0ecbf4 100644 --- a/scripts/Arch/lib/deploy.fish +++ b/scripts/Arch/lib/deploy.fish @@ -31,7 +31,7 @@ function deploySoftware -d "Deploys a the specified software action" -a action source "$dir/../Software/xone/main.fish" $argv end - and for component in (getOSConfig hardware.components --json | jq '.[]' --raw-output0 | string split0) + and for component in (getOSConfig hardware.components --json | jq '.[]' --raw-output0 | string split0 || true) switch "$component" case "Logitech G903" source "$dir/../../Common/Drivers/Logitech G903/main.fish" $argv diff --git a/scripts/Common/OS/backup.fish b/scripts/Common/OS/backup.fish index 835070d9..1e34c452 100644 --- a/scripts/Common/OS/backup.fish +++ b/scripts/Common/OS/backup.fish @@ -26,7 +26,7 @@ function backupAction -V dir runHook backupUsers || begin if [ -n "$deployScript" ] - for name in (getUsers | jq '.[]' --raw-output0 | string split0) + for name in (getUsers | jq '.[]' --raw-output0 | string split0 || true) echo "Backing up user `$name`..." and source $deployScript userBackup --user $name end diff --git a/scripts/Common/OS/install.fish b/scripts/Common/OS/install.fish index d0801e6b..52717b40 100755 --- a/scripts/Common/OS/install.fish +++ b/scripts/Common/OS/install.fish @@ -34,7 +34,7 @@ function installAction -V dir if [ -n "$deployScript" ] source "$dir/../../lib/settings.fish" - for name in (getUsers | jq '.[]' --raw-output0 | string split0) + for name in (getUsers | jq '.[]' --raw-output0 | string split0 || true) echo "Configuring user `$name`..." and source $deployScript userConfig --user $name end diff --git a/scripts/Common/OS/users.fish b/scripts/Common/OS/users.fish index 662d3f51..84adbd12 100755 --- a/scripts/Common/OS/users.fish +++ b/scripts/Common/OS/users.fish @@ -5,7 +5,7 @@ set -l users (getUsers) echo "Creating users..." -for name in (echo "$users" | jq '.[]' --raw-output0 | string split0) +for name in (echo "$users" | jq '.[]' --raw-output0 | string split0 || true) echo "Creating user `$name`..." function getUserInfo -V name -a config diff --git a/scripts/Common/Software/chromium/extensions.fish b/scripts/Common/Software/chromium/extensions.fish index f10f8ed6..17d0e490 100644 --- a/scripts/Common/Software/chromium/extensions.fish +++ b/scripts/Common/Software/chromium/extensions.fish @@ -33,7 +33,7 @@ function installExtension -d "Installs a Chromium extension for the browser with sudo chmod -R u+w "$extensionDir" sudo mkdir -p "$policyDir" - for manifest in (find "$policyDir" -name "*.json" -print0 | string split0) + for manifest in (find "$policyDir" -name "*.json" -print0 | string split0 || true) if [ (cat "$manifest" | jq -r ".$property") = "$destination" ] sudo rm "$manifest" end diff --git a/scripts/Common/Software/docker/main.fish b/scripts/Common/Software/docker/main.fish index c5aa1cd1..14556234 100755 --- a/scripts/Common/Software/docker/main.fish +++ b/scripts/Common/Software/docker/main.fish @@ -18,7 +18,7 @@ begin argparse -i "name=" "user=" -- $argv set -l services (getProgramConfig --name "$_flag_name" --json | jq '.services') - for service in (echo "$services" | jq '. // {} | keys[]' --raw-output0 | string split0) + for service in (echo "$services" | jq '. // {} | keys[]' --raw-output0 | string split0 || true) if echo "$services" | SERVICE=$service jq --exit-status ".[env.SERVICE].enable" >/dev/null fish "$dir/services/$service/main.fish" $argv diff --git a/scripts/Common/Software/docker/services/minecraft/main.fish b/scripts/Common/Software/docker/services/minecraft/main.fish index 0dc64a41..f8cc83f2 100644 --- a/scripts/Common/Software/docker/services/minecraft/main.fish +++ b/scripts/Common/Software/docker/services/minecraft/main.fish @@ -30,7 +30,7 @@ begin set uid (id -u $user) set gid (id -g $user) - for service in (yq -0 ".services | keys[]" "$config" | string split0) + for service in (yq -0 ".services | keys[]" "$config" | string split0 || true) set -l envKey "$(getServiceKey "$service").environment" cp "$config" "$file" diff --git a/scripts/Common/Software/docker/services/service.fish b/scripts/Common/Software/docker/services/service.fish index ecc4a063..20246d13 100644 --- a/scripts/Common/Software/docker/services/service.fish +++ b/scripts/Common/Software/docker/services/service.fish @@ -129,10 +129,10 @@ begin function installDockerService -V dir -V nginxRoot set -l config (getServiceOverrides $argv) - set -l servers (getServiceServers $argv | string split0) + set -l servers (getServiceServers $argv | string split0 || true) for i in (seq 1 2 (count $servers)) - set -l locations (getServiceLocations $i $argv | string split0) + set -l locations (getServiceLocations $i $argv | string split0 || true) for j in (seq 1 3 (count $locations)) set -l file (mktemp) @@ -151,13 +151,13 @@ begin end function configureDockerService - set -l servers (getServiceServers $argv | string split0) + set -l servers (getServiceServers $argv | string split0 || true) set -l nginxConfig (__getServiceNginxConfig $argv) for i in (seq 1 2 (count $servers)) set -l domain $servers[(math $i + 1)] set -l subdomain $servers[(math $i)] - set -l locations (getServiceLocations $i $argv | string split0) + set -l locations (getServiceLocations $i $argv | string split0 || true) set domain (getServiceDomain "$subdomain" "$domain") begin diff --git a/scripts/Common/Software/rclone/main.fish b/scripts/Common/Software/rclone/main.fish index cd45f24d..92e629aa 100755 --- a/scripts/Common/Software/rclone/main.fish +++ b/scripts/Common/Software/rclone/main.fish @@ -73,7 +73,7 @@ begin set sessionPid (sudo pgrep -t $freeTty -u "$name") end - sudo openvt -sw -- sudo -u "$name" env (sudo cat /proc/$sessionPid/environ | string split0) /usr/lib/plasma-dbus-run-session-if-needed startplasma-wayland + sudo openvt -sw -- sudo -u "$name" env (sudo cat /proc/$sessionPid/environ | string split0 || true) /usr/lib/plasma-dbus-run-session-if-needed startplasma-wayland sudo rm "$entryPoint" sudo rm "$welcomeConfig" sudo rm "$sessionConfig" @@ -87,7 +87,7 @@ begin mkdir -p ~/.mnt touch ~/.mnt/.trackerignore - for config in (echo "$configs" | jq '.[]' --raw-output0 | string split0) + for config in (echo "$configs" | jq '.[]' --raw-output0 | string split0 || true) set -l configKey "$key.$config" set -l duration "$configKey.cacheDuration" diff --git a/scripts/lib/action.fish b/scripts/lib/action.fish index 95172834..5d4517de 100644 --- a/scripts/lib/action.fish +++ b/scripts/lib/action.fish @@ -44,7 +44,7 @@ function runSetupUserAction -V dir set -l name (getOSConfig setupUser.name) if [ "$USER" != "$name" ] - set -l cmdline (cat /proc/$fish_pid/cmdline | string split0) + set -l cmdline (cat /proc/$fish_pid/cmdline | string split0 || true) if [ (id -u) -ne 0 ] sudo --set-home --preserve-env env "PATH=$PATH" $cmdline diff --git a/winiso/deploy.fish b/winiso/deploy.fish index d05c0f7f..2c06f797 100755 --- a/winiso/deploy.fish +++ b/winiso/deploy.fish @@ -215,7 +215,7 @@ begin and begin source "$dir/../scripts/lib/settings.fish" - and for name in (getProfiles | jq '.[]' --raw-output0 | string split0) + and for name in (getProfiles | jq '.[]' --raw-output0 | string split0 || true) set -l CONFIG_NAME "$name" set -l file "$projectPath/.config/$name.json" and mkdir -p (dirname $file)