Skip to content

Commit

Permalink
updater needs to take care not only started from an env (#1543)
Browse files Browse the repository at this point in the history
* fix updater for none env calls

* prepare v7.0.4
  • Loading branch information
ReimarBauer authored Sep 6, 2022
1 parent c291001 commit ce485c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ Changelog
=========


Version 7.0.4
~~~~~~~~~~~~~

Bug fix release

All changes:
https://github.com/Open-MSS/MSS/milestone/88?closed=1



Version 7.0.3
~~~~~~~~~~~~~

Expand Down
21 changes: 12 additions & 9 deletions mslib/utils/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,18 @@ def __init__(self, parent=None):
self.old_version = None
# we are using the installer version of the env
self.conda_prefix = os.getenv("CONDA_PREFIX")
self.command = os.path.join(self.conda_prefix, 'bin', "conda")
mamba_cmd = os.path.join(self.conda_prefix, 'bin', 'mamba')
# Check if mamba is installed in the env
try:
subprocess.run([mamba_cmd], startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self.command = mamba_cmd
except FileNotFoundError:
pass
if self.conda_prefix is not None:
self.command = os.path.join(self.conda_prefix, 'bin', "conda")
mamba_cmd = os.path.join(self.conda_prefix, 'bin', 'mamba')
# Check if mamba is installed in the env
try:
subprocess.run([mamba_cmd], startupinfo=subprocess_startupinfo(),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
self.command = mamba_cmd
except FileNotFoundError:
pass
else:
self.command = "conda"

# pyqtSignals don't work without an application eventloop running
if QtCore.QCoreApplication.startingUp():
Expand Down
2 changes: 1 addition & 1 deletion mslib/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
See the License for the specific language governing permissions and
limitations under the License.
"""
__version__ = u'7.0.3.'
__version__ = u'7.0.4.'

0 comments on commit ce485c5

Please sign in to comment.