Skip to content

Commit 7db2580

Browse files
authored
Merge pull request #209 from LambdaTest/dev
3.0.6
2 parents 289d763 + e4d1960 commit 7db2580

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

commands/utils/set_args.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function sync_args_from_cmd(args) {
2727
process.env.LT_USERNAME
2828
);
2929
lt_config["lambdatest_auth"]["username"] = process.env.LT_USERNAME;
30-
}
30+
}
3131
} else if (
3232
process.env.LT_USERNAME &&
3333
(!("lambdatest_auth" in lt_config) ||
@@ -41,7 +41,9 @@ function sync_args_from_cmd(args) {
4141
lt_config["lambdatest_auth"] = {};
4242
}
4343
lt_config["lambdatest_auth"]["username"] = process.env.LT_USERNAME;
44-
}
44+
}else if ("username" in args && args["username"]!=""){
45+
lt_config["lambdatest_auth"]["username"] = args["username"];
46+
}
4547

4648
if (
4749
"lambdatest_auth" in lt_config &&
@@ -63,6 +65,8 @@ function sync_args_from_cmd(args) {
6365
}
6466
console.log("Setting access key from environment");
6567
lt_config["lambdatest_auth"]["access_key"] = process.env.LT_ACCESS_KEY;
68+
}else if ("access_key" in args && args["access_key"]!=""){
69+
lt_config["lambdatest_auth"]["access_key"] = args["access_key"];
6670
}
6771

6872
if (!("browsers" in lt_config) || lt_config["browsers"].length == 0) {
@@ -371,13 +375,13 @@ function sync_args_from_cmd(args) {
371375
if ("exclude_specs" in lt_config["run_settings"]) {
372376
lt_config["run_settings"]["exclude_specs"] =
373377
lt_config["run_settings"]["exclude_specs"].split(",");
378+
console.log(
379+
"specs to exclude are",
380+
lt_config["run_settings"]["exclude_specs"]
381+
);
374382
} else {
375383
lt_config["run_settings"]["exclude_specs"] == [];
376384
}
377-
console.log(
378-
"specs to exclude are",
379-
lt_config["run_settings"]["exclude_specs"]
380-
);
381385

382386
if ("npm-f" in args) {
383387
if (args["npm-f"] == "true") {

index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ const argv = require("yargs")
1717
describe: "path of the config file",
1818
type: "string",
1919
})
20+
.option("user", {
21+
alias: "username",
22+
describe: "Lambdatest Username of User",
23+
type: "string",
24+
})
25+
.option("ak", {
26+
alias: "access_key",
27+
describe: "Lambdatest Access Key of User",
28+
type: "string",
29+
})
2030
.option("lcf", {
2131
alias: "lambdatest-config-file",
2232
describe: "path of the lambdatest config file",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambdatest-cypress-cli",
3-
"version": "3.0.5",
3+
"version": "3.0.6",
44
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
55
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
66
"author": "LambdaTest <[email protected]>",

0 commit comments

Comments
 (0)