build: remove env logging in exec method

This adds a lot of noise and very rare proved to be useful.

Envs are also printed as part of step 300.
This commit is contained in:
Alan Agius 2022-06-14 15:25:37 +00:00 committed by Alan Agius
parent e8470ed391
commit d1e3d98b81
2 changed files with 1 additions and 13 deletions

View File

@ -1,20 +1,8 @@
import { git, silentGit } from './process';
export async function gitClean(): Promise<void> {
console.log(' Cleaning git...');
await silentGit('clean', '-df');
await silentGit('reset', '--hard');
// Checkout missing files
const { stdout } = await silentGit('status', '--porcelain');
const files = stdout
.split(/[\n\r]+/g)
.filter((line) => line.match(/^ D/))
.map((line) => line.replace(/^\s*\S+\s+/, ''));
await silentGit('checkout', ...files);
await expectGitToBeClean();
}
export async function expectGitToBeClean(): Promise<void> {

View File

@ -49,7 +49,7 @@ function _exec(options: ExecOptions, cmd: string, args: string[]): Promise<Proce
console.log(colors.blue(`Running \`${cmd} ${args.map((x) => `"${x}"`).join(' ')}\`${flags}...`));
console.log(colors.blue(`CWD: ${cwd}`));
console.log(colors.blue(`ENV: ${JSON.stringify(env)}`));
const spawnOptions: SpawnOptions = {
cwd,
...(env ? { env } : {}),