mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: add logging to notes generator (#49301)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
This commit is contained in:
@@ -105,12 +105,17 @@ class Pool {
|
||||
**/
|
||||
|
||||
const runGit = async (dir: string, args: string[]) => {
|
||||
console.log(`Running git ${args.join(' ')} in ${dir}`);
|
||||
const response = spawnSync('git', args, {
|
||||
cwd: dir,
|
||||
encoding: 'utf8',
|
||||
stdio: ['inherit', 'pipe', 'pipe']
|
||||
});
|
||||
if (response.status !== 0) {
|
||||
console.error(`Git command failed: git ${args.join(' ')}`);
|
||||
console.error('STDERR was ' + response.stderr.trim());
|
||||
console.error('STDOUT was ' + response.stdout.trim());
|
||||
console.log('Response status:', response.status);
|
||||
throw new Error(response.stderr.trim());
|
||||
}
|
||||
return response.stdout.trim();
|
||||
|
||||
Reference in New Issue
Block a user