mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-04 08:09:08 +08:00
use System.run for logging Git diff
This commit is contained in:
@@ -57,7 +57,10 @@ export default class Versioning {
|
||||
* Log up to maxDiffLines of the git diff.
|
||||
*/
|
||||
static async logDiff() {
|
||||
this.git(['--no-pager', 'diff', '|', 'head', '-n', this.maxDiffLines.toString()]);
|
||||
await System.run('sh', undefined, {
|
||||
input: Buffer.from(`git --no-pager diff | head -n ${this.maxDiffLines.toString()}`),
|
||||
silent: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user