Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fix for the token read not reading more than 1024 chars. Version incr…
Browse files Browse the repository at this point in the history
…ement.
  • Loading branch information
organom committed Sep 11, 2019
1 parent 06ef21c commit 4849df0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,21 @@ static void Main(string[] args)
}
Enum.TryParse(selected, out InstallerOptions opt);
Directory.CreateDirectory(rootFolder);

var token = args.Length > 1 && enableRegistrationTokenRequest ? args[1] : "";
if (enableRegistrationTokenRequest && (opt == InstallerOptions.Gatekeeper || opt == InstallerOptions.BeameSDK))
token = requestRegistrationToken(token);

SetupProxy();
var env = SetupEnvVariables();
var result = false;
var token = args.Length > 1 && enableRegistrationTokenRequest ? args[1] : "";
switch(opt)
{
case InstallerOptions.Gatekeeper:
if (enableRegistrationTokenRequest) token = requestRegistrationToken(token);
result = (disableInstallDependencies || InstallDeps(env)) && InstallBeameGateKeeper(token, env);
break;

case InstallerOptions.BeameSDK:
if (enableRegistrationTokenRequest) token = requestRegistrationToken(token);
result = (disableInstallDependencies || InstallDeps(env)) && InstallBeameSDK(token, env);
break;

Expand Down Expand Up @@ -239,7 +241,7 @@ private static string requestRegistrationToken(string token)
while (string.IsNullOrWhiteSpace(token))
{
// extend readline size
Console.SetIn(new StreamReader(Console.OpenStandardInput(2048)));
Console.SetIn(new StreamReader(Console.OpenStandardInput(2048), Console.InputEncoding, false, 2048));

Console.WriteLine();
Console.WriteLine("Please enter registration token:");
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.4.0")]
[assembly: AssemblyFileVersion("1.3.4.0")]
[assembly: AssemblyVersion("1.3.5.0")]
[assembly: AssemblyFileVersion("1.3.5.0")]

0 comments on commit 4849df0

Please sign in to comment.