Skip to content
Open
Show file tree
Hide file tree
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pstack/skills/statechart/scripts/test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ const launcherTools = () => {
};

const linkedLauncher = () => {
const links = fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-"));
// os.tmpdir() is a symlink on macOS (/tmp -> /private/tmp, /var -> /private/var).
// The kernel resolves a relative link's ".." segments from the physical directory,
// so building the link from the lexical path lands one level too shallow and the
// spawn fails. Resolve the temp directory first so both sides are physical.
const links = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-")));
const [first, second] = [path.join(links, "a"), path.join(links, "b")];
fs.mkdirSync(first);
fs.mkdirSync(second);
Expand Down