docx-validate
    Preparing search index...

    Function isCliEntry

    • True iff metaUrl (always import.meta.url) refers to the same file the process was launched with (argv1 = process.argv[1]).

      Both sides are realpath-normalized before comparing. This matters because Node resolves import.meta.url through symlinks (it hands you the realpath) but leaves process.argv[1] spelled exactly as invoked. A raw string compare therefore FALSELY mismatches whenever the script is reached via a symlinked directory or a relative path — making the CLI silently no-op (exit 0, no output). That is exactly how a /Users/arthrod/T -> /Users/arthrod/temp/T symlink caused python-jubarte's absolute-path validate.ts invocation to validate nothing and report every file valid.

      Parameters

      • metaUrl: string
      • argv1: string | undefined

      Returns boolean