summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSfusato <raie2003@scs.ubbcluj.ro>2018-12-24 10:46:47 +0200
committerJosé Valim <jose.valim@plataformatec.com.br>2019-01-29 20:27:31 +0100
commitb37ecb0f8ee6864065ae2f215b1a1b5aeb434b0f (patch)
treef2a03977580cf4531ee467ffa50589954db34b6d
parentac947a5d1d05d20afde33bb13c094fce07872346 (diff)
downloadelixir-b37ecb0f8ee6864065ae2f215b1a1b5aeb434b0f.tar.gz
Add IEx warning when using --remsh with 'dumb' terminal (#8563)
Closes #8562
-rw-r--r--lib/iex/lib/iex/cli.ex7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/iex/lib/iex/cli.ex b/lib/iex/lib/iex/cli.ex
index ec70b0cdd..7c8a27c8a 100644
--- a/lib/iex/lib/iex/cli.ex
+++ b/lib/iex/lib/iex/cli.ex
@@ -53,6 +53,13 @@ defmodule IEx.CLI do
if tty_works?() do
:user_drv.start([:"tty_sl -c -e", tty_args()])
else
+ if get_remsh(:init.get_plain_arguments()) do
+ IO.puts(
+ :stderr,
+ "warning: the --remsh option will be ignored because IEx is running on limited shell"
+ )
+ end
+
:application.set_env(:stdlib, :shell_prompt_func, {__MODULE__, :prompt})
:user.start()
local_start()