Skip to content

Commit

Permalink
fix missing exampleFile
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuwuj committed Mar 25, 2024
1 parent 17251de commit 353f11b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,16 @@ export const askQuestions = async (
break;
}

// Select local file or folder
if (selectedSource === "file" || selectedSource === "folder") {
console.log("selectedSource", selectedSource);
if (selectedSource === "exampleFile") {
program.dataSources.push({
type: "folder",
config: {},
});
} else if (selectedSource === "file" || selectedSource === "folder") {
// Select local file or folder
const dataSource = {
type: selectedSource === "exampleFile" ? "folder" : selectedSource,
type: selectedSource,
config: {},
};

Expand All @@ -703,10 +709,8 @@ export const askQuestions = async (
paths: selectedPaths,
};
program.dataSources.push(dataSource);
}

// Selected web data source
else if (selectedSource === "web") {
} else if (selectedSource === "web") {
// Selected web data source
const validateUrl = (value: string) => {
for (let url of value.split(",")) {
if (!url.includes("://")) {
Expand Down

0 comments on commit 353f11b

Please sign in to comment.