tupctime: make directory optional

This commit is contained in:
Christopher Monsanto 2020-04-30 07:41:52 -04:00
parent fb10d85d4e
commit fc54681959

View File

@ -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;