Skip to content

Commit 8c77004

Browse files
committed
fix(cli): Excluding migrate from tests
1 parent 58df0ee commit 8c77004

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

templates/cli/index.js.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { version } = require("./package.json");
1111
const { commandDescriptions, cliConfig } = require("./lib/parser");
1212
const { client } = require("./lib/commands/generic");
1313
{% if sdk.test != "true" %}
14-
const { login, logout, whoami, migrateFromOldVersion } = require("./lib/commands/generic");
14+
const { login, logout, whoami, migrate } = require("./lib/commands/generic");
1515
const { pull } = require("./lib/commands/pull");
1616
const { push } = require("./lib/commands/push");
1717
{% endif %}
@@ -28,7 +28,9 @@ program
2828
.version(version, "-v, --version")
2929
.option("--verbose", "Show complete error log")
3030
.option("--json", "Output in JSON format")
31-
.hook('preAction', (c, a) => migrateFromOldVersion())
31+
{% if sdk.test != "true" %}
32+
.hook('preAction', migrate)
33+
{% endif %}
3234
.on("option:json", () => {
3335
cliConfig.json = true;
3436
})

templates/cli/lib/commands/generic.js.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ const client = new Command("client")
303303
success()
304304
}));
305305

306-
const migrateFromOldVersion = async () => {
306+
const migrate = async () => {
307307
if (!globalConfig.has('endpoint') || !globalConfig.has('cookie')) {
308308
return;
309309
}
@@ -331,7 +331,7 @@ module.exports = {
331331
whoami,
332332
login,
333333
logout,
334-
migrateFromOldVersion,
334+
migrate,
335335
{% endif %}
336336
client
337337
};

0 commit comments

Comments
 (0)