We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdbe078 commit fa49115Copy full SHA for fa49115
rsconnect/bundle.py
@@ -815,8 +815,13 @@ def create_glob_set(directory, excludes):
815
816
817
def is_environment_dir(directory):
818
+ """Detect whether `directory` is a virtualenv"""
819
+
820
+ # A virtualenv will have Python at ./bin/python
821
python_path = join(directory, "bin", "python")
- return exists(python_path)
822
+ # But on Windows, it's at Scripts\Python.exe
823
+ win_path = join(directory, "Scripts", "Python.exe")
824
+ return exists(python_path) or exists(win_path)
825
826
827
def list_environment_dirs(directory):
0 commit comments