Skip to content

Commit

Permalink
Fix the feature keyword for Windows.
Browse files Browse the repository at this point in the history
'#+windows' is available only when trivial-features is loaded.
  • Loading branch information
fukamachi committed Sep 15, 2019
1 parent ea59d15 commit 2836173
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion qlot.asd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
(defsystem "qlot/tests"
:class :package-inferred-system
:depends-on ("rove"
"trivial-features"
"qlot/tests/parser"
"qlot/tests/distify/ql"
"qlot/tests/distify/git"
Expand Down
4 changes: 2 additions & 2 deletions tests/utils.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

(deftest with-in-directory-tests
(let ((cwd (uiop:getcwd)))
#+windows
#+(or mswindows win32)
(with-in-directory #P"C:/"
(ok (equal (uiop:native-namestring (uiop:getcwd)) "C:\\\\")))
#-windows
#-(or mswindows win32)
(with-in-directory #P"/"
(ok (equal (uiop:getcwd) #P"/")))
(ok (equal (uiop:getcwd) cwd))))
Expand Down
7 changes: 7 additions & 0 deletions utils/git.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
(defun git-clone (remote-url destination &key (checkout-to "master") ref)
(tagbody git-cloning
(when (uiop:directory-exists-p destination)
#+(or mswindows win32)
(uiop:run-program (list "attrib"
"-r" "-h"
(format nil "~A*.*" (uiop:native-namestring destination))
"/s" "/d")
:error-output *error-output*
:ignore-error-status t)
(uiop:delete-directory-tree destination :validate t))
(restart-case
(safety-shell-command "git"
Expand Down
2 changes: 1 addition & 1 deletion utils/tmp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(defmacro with-tmp-directory ((tmp-dir &key (prefix "qlot-")) &body body)
`(let ((,tmp-dir (tmp-directory ,prefix)))
(unwind-protect (progn ,@body)
#+windows
#+(or mswindows win32)
(uiop:run-program (list "attrib"
"-r" "-h"
(format nil "~A*.*" (uiop:native-namestring ,tmp-dir))
Expand Down

0 comments on commit 2836173

Please sign in to comment.