improve Watcher ctor macro exclusions
Some checks are pending
CI (Debug) / build (push) Waiting to run
CI (Release) / build (push) Waiting to run
CI (Release) / release (push) Blocked by required conditions
CI (Release) / release-test (push) Blocked by required conditions

This commit is contained in:
bluepilledgreat 2025-03-15 14:35:09 +00:00
parent d0f1b9de22
commit 49fd8eb2d2

View File

@ -28,21 +28,21 @@ namespace Bloxstrap
string? watcherDataArg = App.LaunchSettings.WatcherFlag.Data;
#if DEBUG
if (String.IsNullOrEmpty(watcherDataArg))
{
#if DEBUG
string path = new RobloxPlayerData().ExecutablePath;
using var gameClientProcess = Process.Start(path);
_watcherData = new() { ProcessId = gameClientProcess.Id };
}
#else
if (String.IsNullOrEmpty(watcherDataArg))
throw new Exception("Watcher data not specified");
#endif
if (!String.IsNullOrEmpty(watcherDataArg))
}
else
{
_watcherData = JsonSerializer.Deserialize<WatcherData>(Encoding.UTF8.GetString(Convert.FromBase64String(watcherDataArg)));
}
if (_watcherData is null)
throw new Exception("Watcher data is invalid");