refactor: replace Object.assign with spread syntax

This commit is contained in:
2026-10-29 01:17:10 +03:00
parent 05be4ab622
commit f417fcac73
8 changed files with 30 additions and 27 deletions
+7 -9
View File
@@ -14,15 +14,13 @@ export class Command {
constructor(command: string, options?: any) {
this.command = command;
this.isWindows = process.platform.lastIndexOf("win") === 0;
this.options = Object.assign(
{
cwd: process.cwd(),
env: process.env,
verbosity: options && options.silent ? 1 : 2,
usePowerShell: false,
},
options || {},
);
this.options = {
cwd: process.cwd(),
env: process.env,
verbosity: options?.silent ? 1 : 2,
usePowerShell: false,
...(options || {}),
};
let previousPath;
previousPath = this.options.env.PATH;