Skip to content

Commit fc128fd

Browse files
Nadezhda Atanasovarosen-vladimirov
Nadezhda Atanasova
authored andcommitted
Pass correct release arguments to run command (#2906)
* Pass correct release arguments to run command #2903 * Fix merge of options during `tns run` The `$options` object has the required information for all passed `--` args, but all of them are in `get` methods. Calling `merge` does not get functions (like `get`ers), so we do not receive expected options (like `--release, --keyStorePath`, etc.) in the merged object. In order to fix this just use the `this.$options.argv` which contains the information we need.
1 parent 80c9aac commit fc128fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/commands/run.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ export class RunCommandBase implements ICommand {
9797
const runPlatformOptions: IRunPlatformOptions = {
9898
device: this.$options.device,
9999
emulator: this.$options.emulator,
100-
justlaunch: this.$options.justlaunch,
100+
justlaunch: this.$options.justlaunch
101101
};
102102

103-
const deployOptions = _.merge<IDeployPlatformOptions>({ projectDir: this.$projectData.projectDir, clean: true }, this.$options);
103+
const deployOptions = _.merge<IDeployPlatformOptions>({
104+
projectDir: this.$projectData.projectDir,
105+
clean: true,
106+
}, this.$options.argv);
104107

105108
await this.$platformService.deployPlatform(args[0], this.$options, deployOptions, this.$projectData, this.$options);
106109
await this.$platformService.startApplication(args[0], runPlatformOptions, this.$projectData.projectId);

0 commit comments

Comments
 (0)