Skip to content

Commit

Permalink
feat(@angular/cli): disable progress when running outside TTY
Browse files Browse the repository at this point in the history
The default value is changed from `true` to `progress.stdout.isTTY`. It
still has lower priority than value specified by command line flag or in
the .angular-cli.json config.

Fixes #8148
  • Loading branch information
devoto13 authored and hansl committed Nov 21, 2017
1 parent c27c7c9 commit 4774049
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/documentation/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Note: service worker support is experimental and subject to change.
<details>
<summary>progress</summary>
<p>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true</<em>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true inside TTY, false otherwise</<em>
</p>
<p>
Log progress to the console while building.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/eject.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ng eject
<details>
<summary>progress</summary>
<p>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true</em>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true inside TTY, false otherwise</em>
</p>
<p>
Log progress to the console while building.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ All the build Options are available in serve, below are the additional options.
<details>
<summary>progress</summary>
<p>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true</em>
<code>--progress</code> (aliases: <code>-pr</code>) <em>default value: true inside TTY, false otherwise</em>
</p>
<p>
Log progress to the console while building.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will
<details>
<summary>progress</summary>
<p>
<code>--progress</code> <em>default value: true</em>
<code>--progress</code> <em>default value: true inside TTY, false otherwise</em>
</p>
<p>
Log progress to the console while in progress.
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/xi18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<details>
<summary>progress</summary>
<p>
<code>--progress</code>
<code>--progress</code> <em>default value: true inside TTY, false otherwise</<em>
</p>
<p>
Log progress to the console while running.
Expand Down
4 changes: 3 additions & 1 deletion packages/@angular/cli/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export const baseBuildCommandOptions: any = [
type: Boolean,
aliases: ['pr'],
description: 'Log progress to the console while building.',
default: buildConfigDefaults['progress']
default: typeof buildConfigDefaults['progress'] !== 'undefined'
? buildConfigDefaults['progress']
: process.stdout.isTTY === true
},
{
name: 'i18n-file',
Expand Down
6 changes: 4 additions & 2 deletions packages/@angular/cli/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ const TestCommand = Command.extend({
{
name: 'progress',
type: Boolean,
default: testConfigDefaults['progress'],
description: 'Log progress to the console while in progress.'
description: 'Log progress to the console while in progress.',
default: typeof testConfigDefaults['progress'] !== 'undefined'
? testConfigDefaults['progress']
: process.stdout.isTTY === true,
},
{
name: 'browsers',
Expand Down
4 changes: 2 additions & 2 deletions packages/@angular/cli/commands/xi18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const Xi18nCommand = Command.extend({
{
name: 'progress',
type: Boolean,
default: true,
description: 'Log progress to the console while running.'
description: 'Log progress to the console while running.',
default: process.stdout.isTTY === true,
},
{
name: 'app',
Expand Down
3 changes: 1 addition & 2 deletions packages/@angular/cli/lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,7 @@
},
"progress": {
"description": "The ssl key used by the server.",
"type": "boolean",
"default": true
"type": "boolean"
},
"poll": {
"description": "Enable and define the file watching poll time period (milliseconds).",
Expand Down

0 comments on commit 4774049

Please sign in to comment.