Respect temporary-file-directory in Android test controller

* test/infra/android/test-controller.el (ats-exec-script):
Respect temporary-file-directory.
This commit is contained in:
Po Lu 2025-02-25 23:20:31 +08:00
parent c2d2094605
commit 5ea0cee19a

View file

@ -452,7 +452,9 @@ as PACKAGE, provided that it is debuggable."
(save-restriction
(narrow-to-region (point) (point))
(let* ((name (format "%s.sh" (make-temp-name "ats-")))
(fullname (concat (file-name-as-directory "/tmp") name)))
(fullname (concat (file-name-as-directory
temporary-file-directory)
name)))
(with-temp-buffer
(insert script)
(write-region (point-min) (point-max) fullname))