Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/lint-markdown-api-history.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { access, constants, readFile } from 'node:fs/promises';
import { readFile, realpath } from 'node:fs/promises';
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { parseArgs } from 'node:util';
Expand Down Expand Up @@ -512,7 +512,7 @@ async function init() {
}
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
if ((await realpath(process.argv[1])) === fileURLToPath(import.meta.url)) {
init().catch((error) => {
console.error(error);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion bin/lint-markdown-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function parseCommandLine() {
}
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
if ((await fs.promises.realpath(process.argv[1])) === fileURLToPath(import.meta.url)) {
const { values: opts, positionals } = parseCommandLine();

if (!opts.root) {
Expand Down
2 changes: 1 addition & 1 deletion bin/lint-markdown-standard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function parseCommandLine() {
}
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
if ((await fs.promises.realpath(process.argv[1])) === fileURLToPath(import.meta.url)) {
const { values: opts, positionals } = parseCommandLine();

if (!opts.root) {
Expand Down
2 changes: 1 addition & 1 deletion bin/lint-markdown-ts-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function parseCommandLine() {
}
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
if ((await fs.promises.realpath(process.argv[1])) === fileURLToPath(import.meta.url)) {
const { values: opts, positionals } = parseCommandLine();

if (!opts.root) {
Expand Down