Commit 2bc6378b authored by Eric Timmons's avatar Eric Timmons
Browse files

Set *default-pathname-defaults* in bundle commands

parent 0783c069
......@@ -56,6 +56,7 @@
(let* ((clpmfile-path (merge-pathnames (gethash :bundle-file options)
(uiop:getcwd)))
(local-config (merge-pathnames ".clpm/bundle.conf"
(uiop:pathname-directory-pathname clpmfile-path))))
(uiop:pathname-directory-pathname clpmfile-path)))
(*default-pathname-defaults* (uiop:pathname-directory-pathname clpmfile-path)))
(when (probe-file local-config)
(config-add-file-source! local-config))))
......@@ -42,6 +42,7 @@
(uiop:getcwd)))
(lockfile-pathname (merge-pathnames (make-pathname :type "lock")
clpmfile-pathname))
(*default-pathname-defaults* (uiop:pathname-directory-pathname clpmfile-pathname))
(lockfile (load-anonymous-context-from-pathname lockfile-pathname))
(cl-source-registry-form (context-to-asdf-source-registry-form lockfile))
(cl-source-registry-value (format nil "~S" cl-source-registry-form))
......
......@@ -48,8 +48,9 @@ exist in the lock file.")
(or yes-p (y-or-n-p "Proceed?"))))
(define-cli-command (("bundle" "install") *bundle-install-ui*) (args options)
(let ((clpmfile-pathname (merge-pathnames (gethash :bundle-file options)
(uiop:getcwd))))
(let* ((clpmfile-pathname (merge-pathnames (gethash :bundle-file options)
(uiop:getcwd)))
(*default-pathname-defaults* (uiop:pathname-directory-pathname clpmfile-pathname)))
(bundle-install clpmfile-pathname :localp (gethash :bundle-local options)
:validate (make-validate-fun (gethash :yes options)
(gethash :output options)))
......
......@@ -53,11 +53,12 @@ preference is to update everything to the latest version possible.")
(or yesp (y-or-n-p "Proceed?"))))
(define-cli-command (("bundle" "update") *bundle-update-ui*) (args options)
(let ((clpmfile-pathname (merge-pathnames (gethash :bundle-file options)
(uiop:getcwd)))
(localp (gethash :bundle-local options))
(yesp (gethash :yes options))
(output (gethash :output options)))
(let* ((clpmfile-pathname (merge-pathnames (gethash :bundle-file options)
(uiop:getcwd)))
(*default-pathname-defaults* (uiop:pathname-directory-pathname clpmfile-pathname))
(localp (gethash :bundle-local options))
(yesp (gethash :yes options))
(output (gethash :output options)))
(bundle-update clpmfile-pathname :update-systems args
:localp localp
:validate (make-validate-fun yesp output))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment