This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
import colors from "ansi-colors";
|
||||
import cp from "child_process";
|
||||
import { defaults, template } from "lodash";
|
||||
import path from "path";
|
||||
import stream from "stream";
|
||||
import util from "util";
|
||||
import Vinyl from "vinyl";
|
||||
import template from "../common/template";
|
||||
|
||||
export class Command {
|
||||
private command: string;
|
||||
@@ -14,7 +14,7 @@ export class Command {
|
||||
constructor(command: string, options?: any) {
|
||||
this.command = command;
|
||||
this.isWindows = process.platform.lastIndexOf("win") === 0;
|
||||
this.options = defaults(options || {}, {
|
||||
this.options = Object.assign(options || {}, {
|
||||
cwd: process.cwd(),
|
||||
env: process.env,
|
||||
verbosity: options && options.silent ? 1 : 2,
|
||||
@@ -69,7 +69,7 @@ export class Command {
|
||||
// execute the command.
|
||||
// we spawn the command in a subshell, so things like i/o redirection
|
||||
// just work. e.g. `echo hello world >> ./hello.txt` works as expected.
|
||||
const command = template(this.command)({
|
||||
const command = template.renderString(this.command, {
|
||||
file: stdin,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user