Skip to content

Commit f15334b

Browse files
committed
Correctly resolve root path if code_swarm is a symlink
This will make it easier to install code_swarm, or link to the `code_swarm` binary from a directory on the $PATH.
1 parent cc1daa4 commit f15334b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bin/code_swarm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ def main():
9696

9797
def root_path():
9898
"Returns the path of the code_swarm source directory"
99-
path = os.path.dirname(__file__)
100-
path = os.path.dirname(path)
101-
return path
99+
real_path = os.path.join(os.path.dirname(__file__), os.readlink(__file__))
100+
return os.path.dirname(real_path)
102101

103102

104103
def invoke_code_swarm(code_swarm_jar, proj_cfg, options):

0 commit comments

Comments
 (0)