Skip to content

Commit f74e5d9

Browse files
committed
fix using config options in paths
1 parent 9a1db88 commit f74e5d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/zigUtil.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ export function resolveExePathAndVersion(
7373
// allow passing predefined variables
7474
resolvedExePath = handleConfigOption(exePath);
7575

76-
if (exePath.startsWith("~")) {
77-
resolvedExePath = path.join(os.homedir(), exePath.substring(1));
78-
} else if (!path.isAbsolute(exePath)) {
79-
resolvedExePath = which.sync(exePath, { nothrow: true });
76+
if (resolvedExePath.startsWith("~")) {
77+
resolvedExePath = path.join(os.homedir(), resolvedExePath.substring(1));
78+
} else if (!path.isAbsolute(resolvedExePath)) {
79+
resolvedExePath = which.sync(resolvedExePath, { nothrow: true });
8080
}
8181
}
8282

0 commit comments

Comments
 (0)