Skip to content

Commit bb322e7

Browse files
Merge pull request #81 from Allsimon/resolve-symlinks-in-self-location
feat(kube-diagrams): resolve symlinks when locating config and icons
2 parents 8e9fd91 + f34baa0 commit bb322e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bin/kube-diagrams

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ from diagrams.k8s.group import Namespace
2525
# Absolute paths to be replaced by urls
2626
#
2727

28-
DIAGRAMS_PATH = str(Path(os.path.abspath(os.path.dirname(diagrams.__file__))).parent)
28+
DIAGRAMS_PATH = str(Path(os.path.dirname(os.path.realpath(diagrams.__file__))).parent)
2929
DIAGRAMS_URL = \
3030
"https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master"
31-
KUBEDIAGRAMS_PATH = str(Path(os.path.abspath(os.path.dirname(__file__))).parent)
31+
KUBEDIAGRAMS_PATH = str(Path(os.path.dirname(os.path.realpath(__file__))).parent)
3232
KUBEDIAGRAMS_URL = \
3333
"https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main"
3434

@@ -331,7 +331,7 @@ def query_path(data, path, default=None):
331331
return data
332332

333333
# Directory where this script is.
334-
DIRNAME = os.path.dirname(__file__)
334+
DIRNAME = os.path.dirname(os.path.realpath(__file__))
335335

336336
# Load configuration.
337337
config = {}

0 commit comments

Comments
 (0)