Skip to content

Commit df096f0

Browse files
Alex Chaplinskydevelar
authored andcommitted
fix: allow passing absolute and relative path as userAppDir option (#515)
1 parent b69d3ab commit df096f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export async function statOrNull(file: string): Promise<Stats | null> {
181181

182182
export async function computeDefaultAppDirectory(projectDir: string, userAppDir: string | null | undefined): Promise<string> {
183183
if (userAppDir != null) {
184-
const absolutePath = path.join(projectDir, userAppDir)
184+
const absolutePath = path.resolve(projectDir, userAppDir)
185185
const stat = await statOrNull(absolutePath)
186186
if (stat == null) {
187187
throw new Error(`Application directory ${userAppDir} doesn't exists`)
@@ -227,4 +227,4 @@ export function getTempName(prefix?: string | n): string {
227227

228228
export function isEmptyOrSpaces(s: string | n) {
229229
return s == null || s.trim().length === 0
230-
}
230+
}

0 commit comments

Comments
 (0)