Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
fix: use stderr for action by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 16, 2018
1 parent ed70d63 commit 536a5d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/action/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface ITask {
export type ActionType = 'spinner' | 'simple' | 'debug'

export interface Options {
stderr?: boolean
stdout?: boolean
}

const stdmockWrite = {
Expand All @@ -20,11 +20,11 @@ const stdmockWrite = {

export class ActionBase {
type!: ActionType
std: 'stdout' | 'stderr' = 'stdout'
std: 'stdout' | 'stderr' = 'stderr'
protected stdmocks?: ['stdout' | 'stderr', string[]][]

public start(action: string, status?: string, opts: Options = {}) {
this.std = opts.stderr ? 'stderr' : 'stdout'
this.std = opts.stdout ? 'stdout' : 'stderr'
const task = (this.task = {action, status, active: !!(this.task && this.task.active)})
this._start()
task.active = true
Expand Down

0 comments on commit 536a5d7

Please sign in to comment.