diff --git a/src/index.ts b/src/index.ts index d28420d..11007a7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,21 @@ #!/usr/bin/env node // Suppress punycode deprecation warning from transitive dependencies -process.removeAllListeners('warning'); -process.on('warning', (warning) => { - if (warning.name === 'DeprecationWarning' && warning.message.includes('punycode')) { +process.removeAllListeners("warning"); +process.on("warning", (warning) => { + if ( + warning.name === "DeprecationWarning" && + warning.message.includes("punycode") + ) { return; // Suppress punycode warnings } console.warn(warning.stack); }); -import {execute} from '@oclif/core' +import { execute } from "@oclif/core"; +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; -await execute({dir: import.meta.url}) \ No newline at end of file +const __dirname = dirname(fileURLToPath(import.meta.url)); + +await execute({ dir: __dirname });