File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import { spawnSync } from '@socketsecurity/lib-stable/process/spawn/child'
3030import { existsSync , readFileSync } from 'node:fs'
3131import path from 'node:path'
3232import process from 'node:process'
33- import { fileURLToPath } from 'node:url'
33+ import { fileURLToPath , pathToFileURL } from 'node:url'
3434
3535import { errorMessage } from '@socketsecurity/lib-stable/errors/message'
3636import { getDefaultLogger } from '@socketsecurity/lib-stable/logger/default'
@@ -407,7 +407,10 @@ function main(): void {
407407
408408// Skip execution when imported (for tests). The CLI entry is direct
409409// `node scripts/repo/install-claude-plugins.mts` invocation.
410- if ( import . meta. url === `file://${ process . argv [ 1 ] } ` ) {
410+ if (
411+ process . argv [ 1 ] &&
412+ import . meta. url === pathToFileURL ( process . argv [ 1 ] ) . href
413+ ) {
411414 try {
412415 main ( )
413416 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments