Skip to content

Commit 640d208

Browse files
committed
ensure we check both -o and --output
1 parent 99c4afd commit 640d208

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/@tailwindcss-cli/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ if (command) {
3333
//
3434
// - `tailwindcss -o output.css` // should run the build command, not show the help message
3535
// - `tailwindcss > output.css` // should run the build command, not show the help message
36-
if ((process.stdout.isTTY && !process.argv.slice(2).includes('-o')) || shared['--help']) {
36+
if (
37+
(process.stdout.isTTY &&
38+
!process.argv.slice(2).some((flag) => flag === '-o' || flag === '--output')) ||
39+
shared['--help']
40+
) {
3741
help({
3842
usage: ['tailwindcss [--input input.css] [--output output.css] [--watch] [options…]'],
3943
options: { ...build.options(), ...sharedOptions },

0 commit comments

Comments
 (0)