Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
1 change: 1 addition & 0 deletions 1 lib/base-package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export abstract class BasePackageManager implements INodePackageManager {
await this.$childProcess.spawnFromEvent(npmExecutable, params, "close", {
cwd: opts.cwd,
stdio: stdioValue,
shell: this.$hostInfo.isWindows,
});

// Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/commands/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class TypingsCommand implements ICommand {
this.$hostInfo.isWindows ? "ns.cmd" : "ns",
["prepare", "android"],
"exit",
{ stdio: "inherit" }
{ stdio: "inherit", shell: this.$hostInfo.isWindows }
);
}

Expand Down
19 changes: 10 additions & 9 deletions 19 lib/common/mobile/android/android-virtual-device-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
import { injector } from "../../yok";

export class AndroidVirtualDeviceService
implements Mobile.IAndroidVirtualDeviceService {
implements Mobile.IAndroidVirtualDeviceService
{
private androidHome: string;
private mapEmulatorIdToImageIdentifier: IStringDictionary = {};

Expand Down Expand Up @@ -211,7 +212,8 @@ export class AndroidVirtualDeviceService
let result: ISpawnResult = null;
let devices: Mobile.IDeviceInfo[] = [];
let errors: string[] = [];
const canExecuteAvdManagerCommand = await this.canExecuteAvdManagerCommand();
const canExecuteAvdManagerCommand =
await this.canExecuteAvdManagerCommand();
if (!canExecuteAvdManagerCommand) {
errors = [
"Unable to execute avdmanager, ensure JAVA_HOME is set and points to correct directory",
Expand All @@ -221,7 +223,8 @@ export class AndroidVirtualDeviceService
if (canExecuteAvdManagerCommand) {
result = await this.$childProcess.trySpawnFromCloseEvent(
this.pathToAvdManagerExecutable,
["list", "avds"]
["list", "avds"],
{ shell: this.$hostInfo.isWindows }
);
} else if (
this.pathToAndroidExecutable &&
Expand Down Expand Up @@ -403,9 +406,8 @@ export class AndroidVirtualDeviceService
private getAvdManagerDeviceInfo(
output: string
): Mobile.IAvdManagerDeviceInfo {
const avdManagerDeviceInfo: Mobile.IAvdManagerDeviceInfo = Object.create(
null
);
const avdManagerDeviceInfo: Mobile.IAvdManagerDeviceInfo =
Object.create(null);

// Split by `\n`, not EOL as the avdmanager and android executables print results with `\n` only even on Windows
_.reduce(
Expand Down Expand Up @@ -437,9 +439,8 @@ export class AndroidVirtualDeviceService
avdFilePath,
AndroidVirtualDevice.CONFIG_INI_FILE_NAME
);
const configIniFileInfo = this.$androidIniFileParser.parseIniFile(
configIniFilePath
);
const configIniFileInfo =
this.$androidIniFileParser.parseIniFile(configIniFilePath);

const iniFilePath = this.getIniFilePath(configIniFileInfo, avdFilePath);
const iniFileInfo = this.$androidIniFileParser.parseIniFile(iniFilePath);
Expand Down
1 change: 1 addition & 0 deletions 1 lib/services/android-plugin-build-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ export class AndroidPluginBuildService implements IAndroidPluginBuildService {
await this.$childProcess.spawnFromEvent(gradlew, localArgs, "close", {
cwd: pluginBuildSettings.pluginDir,
stdio: "inherit",
shell: this.$hostInfo.isWindows,
});
} catch (err) {
this.$errors.fail(
Expand Down
8 changes: 6 additions & 2 deletions 8 lib/services/android/gradle-command-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export class GradleCommandService implements IGradleCommandService {
const { message, cwd, stdio, spawnOptions } = options;
this.$logger.info(message);

const childProcessOptions = { cwd, stdio: stdio || "inherit" };
const childProcessOptions = {
cwd,
stdio: stdio || "inherit",
shell: this.$hostInfo.isWindows,
};
const gradleExecutable =
options.gradlePath ??
(this.$hostInfo.isWindows ? "gradlew.bat" : "./gradlew");
Expand All @@ -44,7 +48,7 @@ export class GradleCommandService implements IGradleCommandService {
private async executeCommandSafe(
gradleExecutable: string,
gradleArgs: string[],
childProcessOptions: { cwd: string; stdio: string },
childProcessOptions: { cwd: string; stdio: string; shell: boolean },
spawnOptions: ISpawnFromEventOptions
): Promise<ISpawnResult> {
try {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.