Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ios-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { spawn, spawnSync } from "child_process";
import { spawn } from "child_process";
import { resolve } from "path";
import { existsSync, readFileSync } from "fs";
import { waitForOutput, executeCommand, tailFilelUntil } from "./utils";
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export declare function executeCommand(args: any, cwd?: any): string;
export declare function executeCommand(args: any, cwd?: string): string;
export declare function waitForOutput(process: any, matcher: any, errorMatcher: any, timeout: any): Promise<boolean>;
export declare function isWin(): boolean;
export declare function killProcessByName(name: any): void;
Expand Down
10 changes: 5 additions & 5 deletions lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as childProcess from "child_process";
import { readFileSync } from "fs";

export function executeCommand(args, cwd?): string {
cwd = cwd || process.cwd();

const output = childProcess.spawnSync("", args.split(" "), {
export function executeCommand(args, cwd = process.cwd()): string {
const commands = args.split(" ");
const baseCommand = commands.shift();
const output = childProcess.spawnSync(baseCommand, commands, {
shell: true,
cwd: process.cwd(),
cwd: cwd,
encoding: "UTF8"
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobile-devices-controller",
"version": "0.0.5",
"version": "1.0.0",
"description": "Manage simulators, emulators and devices",
"main": "index.js",
"scripts": {
Expand Down