Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 85a07b2

Browse files
JSprumunozemilio
authored andcommitted
Use name flag val to override name in app json if present (#432)
* Use name flag val to ioverride name in app json if present * Remove whitespace
1 parent d46c6e4 commit 85a07b2

File tree

1 file changed

+4
-1
lines changed
  • packages/luis/src/commands/luis/application

1 file changed

+4
-1
lines changed

packages/luis/src/commands/luis/application/import.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ export default class LuisApplicationImport extends Command {
4141

4242
const client = utils.getLUISClient(subscriptionKey, endpoint)
4343

44+
const options: any = {}
45+
if (name) options.appName = name
46+
4447
try {
45-
const newAppId = await client.apps.importMethod(JSON.parse(appJSON), undefined)
48+
const newAppId = await client.apps.importMethod(JSON.parse(appJSON), options)
4649
this.log(`App successfully imported with id ${newAppId}.`)
4750
} catch (err) {
4851
throw new CLIError(`Failed to import app: ${err}`)

0 commit comments

Comments
 (0)