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

Commit 3410e77

Browse files
authored
Merge pull request #224 from microsoft/emimunoz/luis
Adding validation for invalid qnajson and fixing commands doc reference
2 parents 46e13b0 + c404195 commit 3410e77

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

packages/cli/scripts/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const getUserConfig = async () => {
5050
userConfig.telemetry = false
5151
console.log(chalk.blue('Telemetry will remain disabled'))
5252
console.log(chalk.blue('At any time you may enable data collection by changing the configuration using command:'))
53-
console.log(chalk.blue('bf config:telemetry:enable'))
53+
console.log(chalk.blue('bf config:set:telemetry --enable'))
5454
}
5555

5656
await fs.mkdirp(pathToConfigJson)

packages/cli/src/hooks/init/inithook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const hook: Hook<'init'> = async function (opts) {
7878
userConfig.telemetry = false
7979
this.log(chalk.blue('Telemetry will remain disabled'))
8080
this.log(chalk.blue('At any time you may enable data collection by changing the configuration using command:'))
81-
this.log(chalk.blue('bf config:telemetry:enable'))
81+
this.log(chalk.blue('bf config:set:telemetry --enable'))
8282
}
8383

8484
await writeUserConfig(userConfig)

packages/lu/src/parser/converters/qnajsontoqnaconverter.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ module.exports = {
5353
} else {
5454
root = QnAJSON.qnaList;
5555
}
56+
57+
if (!root) {
58+
throw (new exception(retCode.errorCode.INVALID_INPUT_FILE, 'No input QnA content found '));
59+
}
60+
5661
if(root.length > 0) {
5762
root.forEach(function(qnaItem) {
5863
fileContent += '> Source: ' + qnaItem.source + NEWLINE;

0 commit comments

Comments
 (0)