File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 6363If VIRTUALENV (list of string) is specified, it is used instead of
6464`python-environment-virtualenv' ."
6565 (let ((path (convert-standard-filename (expand-file-name
66- (or root python-environment-root)))))
66+ (or root python-environment-root))))
67+ (virtualenv (or virtualenv python-environment-virtualenv)))
68+ (unless (executable-find (car virtualenv))
69+ (error " Program named %S does not exist. " (car virtualenv)))
6770 (python-environment--deferred-process
6871 (format " Making virtualenv at %s " path)
69- (append (or virtualenv python-environment-virtualenv)
70- (list path)))))
72+ (append virtualenv (list path)))))
7173
7274(defun python-environment-exists-p (&optional root )
7375 " Return non-`nil' if virtualenv at ROOT exists."
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ variable can be given as ENVIRONMENT (see `pye-with-mixed-environment')."
8383 (error " Subprocess terminated with code %S .\n Output:\n %s "
8484 code (buffer-string )))))))))
8585
86+ (pye-deftest pye-test-make-environment-with-non-existing-command ()
87+ (should-error (python-environment-make nil '(" non-existing-command" ))))
88+
8689(pye-deftest pye-test-make-environment ()
8790 (deferred:sync! (python-environment-make)))
8891
You can’t perform that action at this time.
0 commit comments