Skip to content

Commit bbf7758

Browse files
committed
allow wireit scripts to use package runners
1 parent 4f1ed7d commit bbf7758

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/analyzer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ function isValidWireitScriptCommand(command: string): boolean {
132132
// do not automatically add all parent directory `node_modules/.bin`
133133
// folders to PATH.
134134
/^(\.\.\/)+node_modules\/\.bin\/wireit$/.test(command) ||
135-
(IS_WINDOWS && /^(\.\.\\)+node_modules\\\.bin\\wireit\.cmd$/.test(command))
135+
(IS_WINDOWS && /^(\.\.\\)+node_modules\\\.bin\\wireit\.cmd$/.test(command)) ||
136+
// This form is useful in preinstall scripts where wireit has not yet been
137+
// installed and cannot be invoked directly.
138+
/^(npx|pnpx|pnpm dlx|bunx|dx) wireit$/.test(command)
136139
);
137140
}
138141

0 commit comments

Comments
 (0)