Skip to content

Commit

Permalink
remove FORCE_TTY and FORCE_WATCH
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Mitchell <[email protected]>
  • Loading branch information
starpit committed Oct 23, 2024
1 parent f12de45 commit 3f71e6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/boot/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func upLLIR(ctx context.Context, backend be.Backend, ir llir.LLIR, opts UpOption
isRunning := make(chan struct{})
cancellable, cancel := context.WithCancel(ctx)

if opts.Watch && !util.StdoutIsTty() && os.Getenv("LUNCHPAIL_FORCE_WATCH") == "" {
if opts.Watch && !util.StdoutIsTty() {
// if stdout is not a tty, then we can't support
// watch, no matter what the user asked for
fmt.Fprintf(os.Stderr, "Warning: disabling watch mode because stdout is not a tty\n")
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ func StdinIsTty() bool {
}

func StdoutIsTty() bool {
return term.IsTerminal(int(os.Stdout.Fd())) || os.Getenv("LUNCHPAIL_FORCE_TTY") != ""
return term.IsTerminal(int(os.Stdout.Fd()))
}
6 changes: 0 additions & 6 deletions tests/bin/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ if [[ -n "$taskqueue" ]]
then QUEUE="--queue $taskqueue"
fi

# due to the use of eval, `up` will think it is not attached to a tty
export LUNCHPAIL_FORCE_WATCH=1

# same re: eval... the pipeline/redirect needs to know it is attached to a tty
export LUNCHPAIL_FORCE_TTY=1

echo "Calling up using target=${LUNCHPAIL_TARGET:-kubernetes}"
eval $testapp up \
-v \
Expand Down

0 comments on commit 3f71e6e

Please sign in to comment.