Skip to content

Commit

Permalink
fix: allow passing absolute and relative path as userAppDir option (#515
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Alex Chaplinsky authored and develar committed Jun 16, 2016
1 parent b69d3ab commit df096f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export async function statOrNull(file: string): Promise<Stats | null> {

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

export function isEmptyOrSpaces(s: string | n) {
return s == null || s.trim().length === 0
}
}

0 comments on commit df096f0

Please sign in to comment.