From 6b12f65244964ba740d1a2c2ef7a0b6e3c7b5eb0 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 20 Sep 2016 11:08:18 +0200 Subject: Fix #1525: start repl if first arg to dotr starts with hyphen --- bin/dotr | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/dotr b/bin/dotr index b11712fe9..8905afd11 100755 --- a/bin/dotr +++ b/bin/dotr @@ -29,9 +29,13 @@ function runMain { fi } +first_arg=$1 + if [ -z "$1" ]; then echo "Starting dotty REPL..." eval "$DOTTY_ROOT/bin/dotc -repl" +elif [[ ${first_arg:0:1} == "-" ]]; then + eval "$DOTTY_ROOT/bin/dotc -repl $@" else runMain "$@" fi -- cgit v1.2.3