From 55e360d1db8b86e77341437ef949b30f8c160a1c Mon Sep 17 00:00:00 2001 From: Benjamin Motz Date: Sun, 24 Feb 2019 10:36:01 +0100 Subject: [PATCH 1/2] Remove duplicate directory-separator --- pyvenv.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyvenv.el b/pyvenv.el index 332544c..09ce69d 100644 --- a/pyvenv.el +++ b/pyvenv.el @@ -214,11 +214,11 @@ This is usually the base name of `pyvenv-virtual-env'.") (run-hooks 'pyvenv-pre-activate-hooks) (let ((new-directories (append ;; Unix - (when (file-exists-p (format "%s/bin" directory)) - (list (format "%s/bin" directory))) + (when (file-exists-p (expand-file-name "bin" directory)) + (list (expand-file-name "bin" directory))) ;; Windows - (when (file-exists-p (format "%s/Scripts" directory)) - (list (format "%s/Scripts" directory) + (when (file-exists-p (expand-file-name "Scripts" directory)) + (list (expand-file-name "Scripts" directory) ;; Apparently, some virtualenv ;; versions on windows put the ;; python.exe in the virtualenv root From a1559b996109bc93384df5b006e9b8370c74e36d Mon Sep 17 00:00:00 2001 From: Benjamin Motz Date: Sun, 24 Feb 2019 11:26:54 +0100 Subject: [PATCH 2/2] Use path-separator --- pyvenv.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyvenv.el b/pyvenv.el index 09ce69d..58c0b50 100644 --- a/pyvenv.el +++ b/pyvenv.el @@ -231,7 +231,7 @@ This is usually the base name of `pyvenv-virtual-env'.") ;; but not to `process-environment'? exec-path (append new-directories exec-path) ;; set eshell path to same as exec-path - eshell-path-env (mapconcat 'identity exec-path ":") + eshell-path-env (mapconcat 'identity exec-path path-separator) process-environment (append (list (format "VIRTUAL_ENV=%s" directory)