Skip to content

Commit f004ff8

Browse files
committed
Fix do not use /tmp which is brittle in GitHub env
1 parent 2b7e72e commit f004ff8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/cram/below-flag-with-subdirectory.t

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ Using --below with a relative path from the root.
136136

137137
Test that --below flag fails when path is not in workspace.
138138

139-
$ cd /tmp
140-
$ dunolint lint --root ${ROOT} --below subdir2 --dry-run
141-
Error: Path "/tmp/subdir2" is not in dune workspace.
142-
[123]
139+
$ TMPDIR=$(mktemp -d)
140+
$ cd ${TMPDIR}
141+
$ dunolint lint --root ${ROOT} --below subdir2 --dry-run 2>&1 | sed "s|${TMPDIR}|<tmpdir>|g"
142+
Error: Path "<tmpdir>/subdir2" is not in dune
143+
workspace.
144+
$ rm -rf ${TMPDIR}
143145

144146
Test that paths are resolved correctly when using --below from a different cwd.
145147

0 commit comments

Comments
 (0)