Skip to content

Commit

Permalink
feat: display composer output with ansi colors (#36)
Browse files Browse the repository at this point in the history
Resolves #35
  • Loading branch information
ramsey authored Oct 26, 2020
1 parent 2c107a1 commit 92a7904
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ For example:

#### composer-options

ramsey/composer-install always passes the `--no-interaction` and `--no-progress`
options to the `composer` command. If you'd like to pass additional options, you
may use the `composer-options` input parameter.
ramsey/composer-install always passes the `--no-interaction`, `--no-progress`,
and `--ansi` options to the `composer` command. If you'd like to pass additional
options, you may use the `composer-options` input parameter.

For example:

Expand Down
13 changes: 9 additions & 4 deletions __tests__/composer/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe('composer.install with mocked exec', () => {
expect(execMock).toHaveBeenCalledWith('composer', [
'install',
'--no-interaction',
'--no-progress'
'--no-progress',
'--ansi'
])
})

Expand All @@ -30,7 +31,8 @@ describe('composer.install with mocked exec', () => {
expect(execMock).toHaveBeenCalledWith('composer', [
'update',
'--no-interaction',
'--no-progress'
'--no-progress',
'--ansi'
])
})

Expand All @@ -44,7 +46,8 @@ describe('composer.install with mocked exec', () => {
'update',
'--prefer-lowest',
'--no-interaction',
'--no-progress'
'--no-progress',
'--ansi'
])
})

Expand All @@ -57,7 +60,8 @@ describe('composer.install with mocked exec', () => {
expect(execMock).toHaveBeenCalledWith('composer', [
'install',
'--no-interaction',
'--no-progress'
'--no-progress',
'--ansi'
])
})

Expand All @@ -71,6 +75,7 @@ describe('composer.install with mocked exec', () => {
'install',
'--no-interaction',
'--no-progress',
'--ansi',
'--opt1',
'--opt2',
'--opt3'
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/composer/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function install(
args.push('install')
}

args.push('--no-interaction', '--no-progress')
args.push('--no-interaction', '--no-progress', '--ansi')
args.push(...options)

const filteredArgs = args.filter(Boolean)
Expand Down

0 comments on commit 92a7904

Please sign in to comment.