diff --git a/package.json b/package.json index 744506c..d62bb74 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@endeavorance/rundir", "type": "module", "module": "src/cli.ts", - "version": "0.1.0", + "version": "0.1.1", "bin": { "rundir": "build/cli.js" }, diff --git a/src/cli.ts b/src/cli.ts index bf79e02..481dab2 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -186,7 +186,8 @@ async function ls(scriptName?: string) { return; } - const filesInDir = new Glob(`${RUNDIR_PATH}/*`).scan(); + const currentRundir = findNearestRundir(); + const filesInDir = new Glob(`${currentRundir}/*`).scan(); const scriptLines: string[] = []; for await (const file of filesInDir) { @@ -199,6 +200,7 @@ async function ls(scriptName?: string) { const sorted = scriptLines.sort((a, b) => a.localeCompare(b)); + console.log(chalk.dim(currentRundir)); console.log(sorted.join("\n")); }