File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,13 @@ build-wp-org:
2323 nix build .#pluginWpOrg
2424
2525# Run tests and other checks
26- check : _check_no_test test
26+ check : _ensure-tmpdir _check_no_test test
27+
28+ # Sometimes editors get a stale TMPDIR.
29+
30+ # This prevents issues with the dir not existing.
31+ _ ensure-tmpdir :
32+ @ [ -z " ${TMPDIR:-}" ] || mkdir -p " $TMPDIR"
2733
2834_ nix-system :
2935 @ nix eval --impure --raw --expr ' builtins.currentSystem'
@@ -50,7 +56,7 @@ dev CLEAN="false" DEBUG="false":
5056 {{ if DEBUG == " true" { " ENABLE_XDEBUG=true nix run . --impure -- --no-server" } else { " nix run . -- --no-server" } }}
5157
5258# Format source and then check for unfixable issues
53- format : && _format-php
59+ format : _ensure-tmpdir && _format-php
5460 just --fmt --unstable
5561 fd -e json -x jsonfmt -w
5662 fd -e nix -x nixfmt
@@ -95,7 +101,7 @@ svn-update:
95101 svn up " {{ svn_dir }} "
96102
97103# Validate and run tests in a sandbox
98- test : _validate _phpcs _test-integration
104+ test : _ensure-tmpdir _validate _phpcs _test-integration
99105
100106# Run integration tests in a sandbox
101107_ test-integration :
You can’t perform that action at this time.
0 commit comments