@tasksai/install 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tasksai/install",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Shared TasksAI MCP installer CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -85,13 +85,23 @@ const CLIENTS = {
85
85
  }
86
86
  };
87
87
 
88
- if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
88
+ if (isMainModule()) {
89
89
  main().catch((error) => {
90
90
  console.error(formatError(error));
91
91
  process.exit(1);
92
92
  });
93
93
  }
94
94
 
95
+ function isMainModule() {
96
+ if (!process.argv[1]) return false;
97
+ const modulePath = fileURLToPath(import.meta.url);
98
+ try {
99
+ return fs.realpathSync(process.argv[1]) === fs.realpathSync(modulePath);
100
+ } catch {
101
+ return path.resolve(process.argv[1]) === modulePath;
102
+ }
103
+ }
104
+
95
105
  async function main() {
96
106
  const options = parseArgs(process.argv.slice(2));
97
107