mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
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:
parent
e8470ed391
commit
d1e3d98b81
@ -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> {
|
||||
|
@ -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 } : {}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user