We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fcc564 commit ac05cc8Copy full SHA for ac05cc8
haskell/private/pkgdb_to_bzl.py
@@ -34,9 +34,11 @@
34
sys.exit("Usage: pkgdb_to_bzl.py <REPO_NAME> <TOPDIR>")
35
36
def resolve(path, pkgroot):
37
- """Resolve references to ${pkgroot} with the given value"""
+ """Resolve references to ${pkgroot} with the given value, resolve $topdir with `topdir`"""
38
if path.find("${pkgroot}") != -1:
39
return path.strip("\"").replace("${pkgroot}", pkgroot)
40
+ elif path.startswith("$topdir"):
41
+ return os.path.normpath(path.replace("$topdir", topdir)).replace('\\', '/')
42
else:
43
return path
44
0 commit comments