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
7 changes: 2 additions & 5 deletions src/common/commandExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export enum CommandStatus {
}

export class CommandExecutor {

private static ReactNativeCommand = "react-native";
private static ReactNativeVersionCommand = "-v";
private currentWorkingDirectory: string;
Expand Down Expand Up @@ -121,7 +122,7 @@ export class CommandExecutor {
*/
public spawnReactCommand(command: string, args?: string[], options: Options = {}): ISpawnResult {
const reactCommand = HostPlatform.getNpmCliCommand(CommandExecutor.ReactNativeCommand);
return this.spawnChildProcess(reactCommand, this.combineArguments(command, args), options);
return this.spawnChildProcess(reactCommand, [command, ...args], options);
}

/**
Expand Down Expand Up @@ -209,8 +210,4 @@ export class CommandExecutor {
private generateRejectionForCommand(command: string, reason: any): Q.Promise<void> {
return Q.reject<void>(ErrorHelper.getNestedError(reason, InternalErrorCode.CommandFailed, command));
}

private combineArguments(firstArgument: string, otherArguments: string[] = []) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return [firstArgument].concat(otherArguments);
}
}
21 changes: 21 additions & 0 deletions src/common/exponent/exponentHelper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

declare class AppJson {
public name: string;
public displayName?: string;
public expo?: ExpConfig;
}

declare class ExpConfig {
public name: string;
public slug: string;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are name and slug required? IIRC CRNA app doesn't have them defined in package.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Expo docs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, makes sense

public sdkVersion: string;
public version?: string;
public entryPoint?: string;
public packagerOpts?: ExpConfigPackager;
}

declare class ExpConfigPackager {
public assetExts?: string[];
}
Loading