Skip to content

Commit

Permalink
fix local setup
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Nov 30, 2023
1 parent 8e8026a commit 07b6525
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ function startServerProcess(owner, repo) {
console.error(`No local games in production mode.`)
return
}
} else {
if(!fs.existsSync(path.join(__dirname, '..', 'games'))) {
console.error(`Did not find the following folder: ${path.join(__dirname, '..', 'games')}`)
console.error('Did you already import any games?')
return
}
}

let game_dir = (owner == 'local') ?
path.join(__dirname, '..', '..', repo) : // note: here we need `repo` to be case sensitive
path.join(__dirname, '..', 'games', `${owner}`, `${repo.toLowerCase()}`)

if(!fs.existsSync(path.join(__dirname, '..', 'games'))) {
console.error(`Did not find the following folder: ${path.join(__dirname, '..', 'games')}`)
console.error('Did you already import any games?')
return
}

if(!fs.existsSync(game_dir)) {
console.error(`Game '${game_dir}' does not exist!`)
return
Expand Down

0 comments on commit 07b6525

Please sign in to comment.