diff --git a/packages/cli/package.json b/packages/cli/package.json index 8f82803..b7d397e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@open-matrix/cli", - "version": "0.1.3", + "version": "0.1.4", "description": "Matrix package-author CLI.", "type": "module", "bin": { diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 775b5f8..066f386 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,5 +1,6 @@ #!/usr/bin/env node import { Command } from 'commander'; +import { realpathSync } from 'node:fs'; import { pathToFileURL } from 'node:url'; import { initCommand } from './commands/init.js'; import { actorCommand } from './commands/actor.js'; @@ -47,7 +48,7 @@ export function createProgram(): Command { program .name('matrix') .description('Matrix SDK CLI for package authors') - .version('0.1.3'); + .version('0.1.4'); const broker = program .command('broker') @@ -854,7 +855,7 @@ async function main(): Promise { const invokedPath = process.argv[1]; const isDirectExecution = Boolean(invokedPath) - && pathToFileURL(invokedPath).href === import.meta.url; + && pathToFileURL(realpathSync(invokedPath)).href === import.meta.url; if (isDirectExecution) { main().catch((err) => {