Commits

Anonymous committed 86475b7

If we are not in a buffer that is a file, then use the default directory as a base for our prompt.

Comments (0)

Files changed (1)

                   pytest-project-root-files)))
 
 (defun pytest-current-root ()
-  (file-name-directory (expand-file-name (buffer-file-name))))
+  (if (not (buffer-file-name))
+      (expand-file-name default-directory)
+    (file-name-directory (expand-file-name (buffer-file-name)))))
 
 (provide 'pytest)