Fix the relative path problem when running quay from non-root

This commit is contained in:
Jake Moshenko 2017-07-13 15:30:50 -04:00
parent ee67674e5b
commit 3b79955c8c
3 changed files with 12 additions and 9 deletions

View file

@ -10,8 +10,8 @@ def slash_join(*args):
are not deduplicated.
"""
def rmslash(path):
path = path[1:] if path[0] == '/' else path
path = path[:-1] if path[-1] == '/' else path
path = path[1:] if len(path) > 0 and path[0] == '/' else path
path = path[:-1] if len(path) > 0 and path[-1] == '/' else path
return path
args = [rmslash(path) for path in args]