Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit 8da677d

Browse files
committed
fix: make sure require base dir is absolute path
1 parent e15072c commit 8da677d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/cli/src/actions/action-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ function findUp<Multiple extends boolean = false>(
126126
}
127127
const target = names.find((name) => fs.existsSync(path.join(cwd, name)));
128128
if (multiple === false && target) {
129-
return path.join(cwd, target) as FindUpResult<Multiple>;
129+
return path.resolve(cwd, target) as FindUpResult<Multiple>;
130130
}
131131
if (target) {
132-
result.push(path.join(cwd, target));
132+
result.push(path.resolve(cwd, target));
133133
}
134134
const up = path.resolve(cwd, '..');
135135
if (up === cwd) {
@@ -183,7 +183,7 @@ export async function getZenStackPackages(
183183
),
184184
).sort();
185185

186-
const require = createRequire(import.meta.url);
186+
const require = createRequire(pkgJsonFile);
187187

188188
const result = packages.map((pkg) => {
189189
try {

0 commit comments

Comments
 (0)