diff options
author | Miguel de Icaza <miguel@gnome.org> | 2016-06-15 09:25:23 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2016-06-15 09:25:30 +0300 |
commit | 0aa112f9ddfdc5b2dcf47a0249efe3cf73bee5d5 (patch) | |
tree | 3a728d5ea66b90092c346fe297cae722c7825dd8 | |
parent | ab73f54d42fc46f6b50ef8c9e13d9892385c7df1 (diff) |
[mkbundle] Improve error checking
-rwxr-xr-x | mcs/tools/mkbundle/mkbundle.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs index 9f75c85749a..2382d37d43d 100755 --- a/mcs/tools/mkbundle/mkbundle.cs +++ b/mcs/tools/mkbundle/mkbundle.cs @@ -292,7 +292,16 @@ class MakeBundle { if (cross_target == "default") runtime = null; else { - var truntime = Path.Combine (targets_dir, cross_target, "mono"); + string truntime; + if (runtime != null) + truntime = runtime; + else { + if (cross_target == null){ + Console.Error.WriteLine ("you should specify either a --runtime or a --cross compilation target"); + Environment.Exit (1); + } + truntime = Path.Combine (targets_dir, cross_target, "mono"); + } if (!File.Exists (truntime)){ Console.Error.WriteLine ($"The runtime for the {cross_target} does not exist, use --fetch-target {cross_target} to download first"); return 1; |