mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-04 15:24:02 -04:00
fix(patch): forcibly disable ANSI color codes when generating patch diff (#9914)
Add `--no-color` to pnpm's invocation of `git diff` within the patch-commit command. Ensures that the .diff files are valid when operating inside of a git repository that has a local config that includes `diff.color=always`
This commit is contained in:
@@ -151,7 +151,7 @@ async function diffFolders (folderA: string, folderB: string): Promise<string> {
|
||||
let stderr!: string
|
||||
|
||||
try {
|
||||
const result = await execa('git', ['-c', 'core.safecrlf=false', 'diff', '--src-prefix=a/', '--dst-prefix=b/', '--ignore-cr-at-eol', '--irreversible-delete', '--full-index', '--no-index', '--text', '--no-ext-diff', folderAN, folderBN], {
|
||||
const result = await execa('git', ['-c', 'core.safecrlf=false', 'diff', '--src-prefix=a/', '--dst-prefix=b/', '--ignore-cr-at-eol', '--irreversible-delete', '--full-index', '--no-index', '--text', '--no-ext-diff', '--no-color', folderAN, folderBN], {
|
||||
cwd: process.cwd(),
|
||||
env: {
|
||||
...process.env,
|
||||
|
||||
Reference in New Issue
Block a user