mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-21 02:39:27 +01:00
--no_python CLI arg to disable python check and implems
This commit is contained in:
@@ -5,6 +5,7 @@ using Flowframes.IO;
|
||||
using Flowframes.MiscUtils;
|
||||
using Flowframes.Os;
|
||||
using Flowframes.Ui;
|
||||
using NDesk.Options;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -49,6 +50,20 @@ namespace Flowframes
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
||||
|
||||
var opts = new OptionSet
|
||||
{
|
||||
{ "np|no_python", "Disable Python implementations", v => Implementations.DisablePython = v != null },
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
opts.Parse(Environment.GetCommandLineArgs());
|
||||
}
|
||||
catch (OptionException e)
|
||||
{
|
||||
Logger.Log($"Error parsing CLI option: {e.Message}", true);
|
||||
}
|
||||
|
||||
Task.Run(() => DiskSpaceCheckLoop());
|
||||
fileArgs = Environment.GetCommandLineArgs().Where(a => a[0] != '-' && File.Exists(a)).ToList().Skip(1).ToArray();
|
||||
args = Environment.GetCommandLineArgs().Where(a => a[0] == '-').Select(x => x.Trim().Substring(1).ToLowerInvariant()).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user