Skip to content

Commit

Permalink
Merge pull request #5207 from Shopify/no-color-fix
Browse files Browse the repository at this point in the history
`--no-color` fix
  • Loading branch information
amcaplan authored Jan 19, 2025
2 parents a7e2043 + 3693514 commit 5159ef6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-carrots-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/cli-kit': patch
---

Ensure no-color mode is respected for warnings and errors
6 changes: 3 additions & 3 deletions packages/cli-kit/src/public/node/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export interface OutputProcess {
* @param message - The message to print.
*/
export function consoleLog(message: string): void {
console.log(withOrWithoutStyle(message))
process.stdout.write(`${withOrWithoutStyle(message)}\n`)
}

/**
Expand All @@ -380,7 +380,7 @@ export function consoleLog(message: string): void {
* @param message - The message to print.
*/
export function consoleError(message: string): void {
console.error(withOrWithoutStyle(message))
process.stderr.write(`${withOrWithoutStyle(message)}\n`)
}

/**
Expand All @@ -389,7 +389,7 @@ export function consoleError(message: string): void {
* @param message - The message to print.
*/
export function consoleWarn(message: string): void {
console.warn(withOrWithoutStyle(message))
process.stderr.write(`${withOrWithoutStyle(message)}\n`)
}

/**
Expand Down

0 comments on commit 5159ef6

Please sign in to comment.