Skip to content

Commit 0e8977c

Browse files
ComputerEliteComputerElite
authored andcommitted
add ability to load script from disk
1 parent 22d4622 commit 0e8977c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void Main(string[] args)
4343
{
4444
Logger.SetLogFile(AppDomain.CurrentDomain.BaseDirectory + "Log.log");
4545
SetupExceptionHandlers();
46-
DowngradeManager.updater = new Updater("1.11.8", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus downgrader", Assembly.GetExecutingAssembly().Location);
46+
DowngradeManager.updater = new Updater("1.11.9", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus downgrader", Assembly.GetExecutingAssembly().Location);
4747
Logger.LogRaw("\n\n");
4848
Logger.Log("Starting Oculus downgrader version " + DowngradeManager.updater.version);
4949
if (args.Length == 1 && args[0] == "--update")
@@ -406,7 +406,8 @@ public void OculusDB()
406406

407407
public void StartWithArgs()
408408
{
409-
string[] args = ConsoleUiController.QuestionString("Enter the code: ").Split('|');
409+
string codeOrFile = ConsoleUiController.QuestionString("Enter the code or a file path: ");
410+
string[] args = (File.Exists(codeOrFile.Replace("\"", "")) ? File.ReadAllText(codeOrFile.Replace("\"", "")) : codeOrFile).Split('|');
410411
foreach(string arg in args)
411412
{
412413
commands.parsedCommand = new ParsedCommand("-nU --userexecuted " + arg).args.ToArray();

0 commit comments

Comments
 (0)