From 8f731112b8ce834b7e28d2eb447112364fb64b96 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 26 Apr 2018 18:35:52 +0200 Subject: [PATCH] Check we're in a tty --- daily-build | 7 +++++++ ynh-build | 7 +++++++ 2 files changed, 14 insertions(+) mode change 100644 => 100755 daily-build diff --git a/daily-build b/daily-build old mode 100644 new mode 100755 index 6082f73..27cb7ed --- a/daily-build +++ b/daily-build @@ -11,6 +11,13 @@ source /home/vinaigrette/config/config function main() { + if [[ "$(tty)" == "not a tty" ]] + then + echo "You aint in a tty (are you in a 'lxc exec' ?)" + echo "The script can't run because pbuilder won't be happy :|" + exit + fi + for PACKAGE in $PACKAGES; do diff --git a/ynh-build b/ynh-build index fda8bb7..bdea0e0 100755 --- a/ynh-build +++ b/ynh-build @@ -137,6 +137,13 @@ function main() validate_arguments + if [[ "$(tty)" == "not a tty" ]] + then + echo "You aint in a tty (are you in a 'lxc exec' ?)" + echo "The script can't run because pbuilder won't be happy :|" + exit + fi + # Sum up configuration echo "########################################################" echo "# Building $PROJECT $BRANCH release - $VERSION version "