only use nom if we write to a terminal

This commit is contained in:
Jörg Thalheim
2025-05-20 13:57:12 +02:00
committed by Jörg Thalheim
parent 58e72c6ec2
commit df522e787f
2 changed files with 2 additions and 2 deletions

2
disko
View File

@@ -127,7 +127,7 @@ fi
echo "disko version $DISKO_VERSION"
nixBuild() {
if command -v nom-build > /dev/null; then
if command -v nom-build > /dev/null && [ -t 1 ]; then
nom-build "$@"
else
nix-build "$@"

View File

@@ -164,7 +164,7 @@ cleanupMountPoint() {
}
nixBuild() {
if command -v nom-build > /dev/null; then
if command -v nom-build > /dev/null && [ -t 1 ]; then
nom-build "$@"
else
nix-build "$@"