Skip to content

Commit

Permalink
Merge pull request #116 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Pull Develop into main
  • Loading branch information
mathomp4 committed Oct 30, 2020
2 parents 9295048 + 10e93fc commit aa883ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions mepo.d/command/diff/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ def check_component_diff(comp, args):
def print_diff(comp, args, output):
columns, lines = get_terminal_size(fallback=(80,20))
horiz_line = u'\u2500'*columns
print("{} (location: {}):".format(comp.name,_get_relative_path(comp.local)))

root_dir = MepoState.get_root_dir()
full_local_path = os.path.join(root_dir,comp.local)
print("{} (location: {}):".format(comp.name,_get_relative_path(full_local_path)))
print()
for line in output.split('\n'):
#print(' |', line.rstrip())
print(line.rstrip())
print(horiz_line)

def _get_relative_path(local_path):
return os.path.relpath(local_path, os.getcwd())
def _get_relative_path(path):
return os.path.relpath(path, os.getcwd())
4 changes: 2 additions & 2 deletions mepo.d/command/whereis/whereis.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ def run(args):
full_local_path=os.path.join(root_dir,comp.local)
print(FMT.format(comp.name, _get_relative_path(full_local_path)))

def _get_relative_path(local_path):
return os.path.relpath(local_path, os.getcwd())
def _get_relative_path(path):
return os.path.relpath(path, os.getcwd())

0 comments on commit aa883ab

Please sign in to comment.