mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-06 19:58:43 +02:00
fix: stabilize macOS CI validation
Remove the packaging-only create-dmg dependency in favor of native hdiutil, and make the hook runner working-directory test assert behavior without depending on macOS temp-path canonicalization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -69,10 +69,11 @@ public sealed class HookCommandRunnerTests
|
||||
HookCommandRunner runner = new();
|
||||
using TestDirectory project = new();
|
||||
string hooksDirectory = Directory.CreateDirectory(Path.Combine(project.Path, "scripts")).FullName;
|
||||
await File.WriteAllTextAsync(Path.Combine(hooksDirectory, "cwd-marker.txt"), "marker");
|
||||
HookCommandDefinition hook = CreatePlatformHook(
|
||||
OperatingSystem.IsWindows()
|
||||
? "$null = [Console]::In.ReadToEnd(); Write-Output ([Environment]::CurrentDirectory + '|' + $env:HOOK_TEST_ENV)"
|
||||
: "cat >/dev/null; printf '%s|%s' \"$(pwd)\" \"$HOOK_TEST_ENV\"",
|
||||
? "$null = [Console]::In.ReadToEnd(); if (Test-Path -LiteralPath './cwd-marker.txt') { $status = 'present' } else { $status = 'missing' }; Write-Output ($status + '|' + $env:HOOK_TEST_ENV)"
|
||||
: "cat >/dev/null; if [ -f ./cwd-marker.txt ]; then status=present; else status=missing; fi; printf '%s|%s' \"$status\" \"$HOOK_TEST_ENV\"",
|
||||
cwd: "scripts",
|
||||
env: new Dictionary<string, string>
|
||||
{
|
||||
@@ -81,7 +82,7 @@ public sealed class HookCommandRunnerTests
|
||||
|
||||
string? output = await runner.RunAsync(hook, "{}", project.Path, CancellationToken.None);
|
||||
|
||||
Assert.Equal($"{hooksDirectory}|configured", output?.Trim());
|
||||
Assert.Equal("present|configured", output?.Trim());
|
||||
}
|
||||
|
||||
private static HookCommandDefinition CreatePlatformHook(
|
||||
|
||||
Reference in New Issue
Block a user