Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/shell.d/runtime-smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ fail_with_log() {

setup_scratch_shell

# The shell reads the platform root at a fixed path; the copy reads an empty
# fixture instead, so a machine's own platform files (a MacBook's notch puts
# the bar in its cutout layout) never change the layout this test checks.
platform_root="$SCRATCH_DIR/platform"
mkdir -p "$platform_root"
{ grep -rlF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"
Comment on lines +22 to +23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Spaces stop the smoke test

If TMPDIR contains a space, such as /tmp/test runs, every matching filename contains that space too. xargs splits these filenames, so sed fails and the test stops before starting the shell. Use grep -rlZF with xargs -0r to preserve complete filenames.

Suggested change
{ grep -rlF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"
{ grep -rlZF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -0r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"

! grep -rqF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" ||
fail "the shell copy reads a fixture platform root, not the machine's"

# Every plugin under ~/.config/omarchy/plugins hot-reloads, whoever wrote it.
hot_reload_id="acme.hot-reload"
hot_reload_dir="$SCRATCH_HOME/.config/omarchy/plugins/$hot_reload_id"
Expand Down