nix machine / user configurations

build: only post updated input if input was actually updated

ptr.pet e7c77815 0f3b3e52

verified
Changed files
+3 -1
+3 -1
deploy.nu
···
def update-input [input: string] {
let result = nix flake update $input | complete
-
webhook $"/inputs/($input)" $"=== updated input ===\n\n($result | to text)" $result.exit_code
}
def main [msg?: string] {
···
def update-input [input: string] {
let result = nix flake update $input | complete
+
if ($result.stderr | str contains "Updated input") or ($result.exit_code != 0) {
+
webhook $"/inputs/($input)" $"=== updated input ($input) ===\n\n($result.stderr)" $result.exit_code
+
}
}
def main [msg?: string] {