Skip to content

Commit

Permalink
Merge pull request #16 from xylar/fix_shell_env_vars
Browse files Browse the repository at this point in the history
Replace `$SHELL{}` with `$()` in environment variables
  • Loading branch information
xylar authored Nov 9, 2021
2 parents 5736263 + d7d9c6d commit 366a81b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "mache" %}
{% set version = "1.1.3" %}
{% set version = "1.1.4" %}

package:
name: {{ name|lower }}
Expand Down
2 changes: 1 addition & 1 deletion mache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from mache.machine_info import MachineInfo
from mache.discover import discover_machine

__version_info__ = (1, 1, 3)
__version_info__ = (1, 1, 4)
__version__ = '.'.join(str(vi) for vi in __version_info__)
4 changes: 4 additions & 0 deletions mache/machine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ def get_modules_and_mpi_compilers(self, compiler, mpilib, debug=False,
value = var.text
# go from the XML syntax to bash variable syntax
value = value.replace('$ENV{', '${')
if '$SHELL' in value:
value = value.replace('$SHELL{', '$(')
# replace the last curly bracket with a parenthesis
value = ')'.join(value.rsplit('}', 1))

env_vars[var_name] = value

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = mache
version = 1.1.3
version = 1.1.4
author = Xylar Asay-Davis
author_email = [email protected]
description = A package for providing configuration data relate to E3SM supported machines
Expand Down

0 comments on commit 366a81b

Please sign in to comment.