mirror of
https://github.com/smogon/sprites.git
synced 2026-10-01 05:37:45 -05:00
tupctime: make directory optional
This commit is contained in:
@@ -5,12 +5,10 @@ const Database = require('better-sqlite3');
|
||||
const debug = require('debug')('tupctime');
|
||||
|
||||
const start = process.argv[2];
|
||||
if (start === undefined) {
|
||||
throw new Error("Pass in directory containing tup db.");
|
||||
if (start !== undefined) {
|
||||
process.chdir(start);
|
||||
}
|
||||
|
||||
process.chdir(start);
|
||||
|
||||
while (true) {
|
||||
if (fs.existsSync('.tup')) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user