Skip to content

Commit 60d4907

Browse files
alexanderkyteluhenry
authored andcommitted
[runtime] Revert mkbundle defaulting behavior made in ca8b8bd (mono#6687)
Fixes mono#6187
1 parent d8d3e29 commit 60d4907

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

mcs/tools/mkbundle/mkbundle.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,8 @@ class MakeBundle {
6666
static bool custom_mode = true;
6767
static string embedded_options = null;
6868

69-
static string runtime_bin = null;
69+
static string runtime = null;
7070

71-
static string runtime {
72-
get {
73-
if (runtime_bin == null && IsUnix)
74-
runtime_bin = Process.GetCurrentProcess().MainModule.FileName;
75-
return runtime_bin;
76-
}
77-
78-
set { runtime_bin = value; }
79-
}
80-
8171
static bool aot_compile = false;
8272
static string aot_args = "static";
8373
static DirectoryInfo aot_temp_dir = null;
@@ -737,8 +727,12 @@ static bool MaybeAddFile (PackageMaker maker, string code, string file)
737727
static bool GeneratePackage (List<string> files)
738728
{
739729
if (runtime == null){
740-
Error ("You must specify at least one runtime with --runtime or --cross");
741-
Environment.Exit (1);
730+
if (IsUnix)
731+
runtime = Process.GetCurrentProcess().MainModule.FileName;
732+
else {
733+
Error ("You must specify at least one runtime with --runtime or --cross");
734+
Environment.Exit (1);
735+
}
742736
}
743737
if (!File.Exists (runtime)){
744738
Error ($"The specified runtime at {runtime} does not exist");

0 commit comments

Comments
 (0)