Skip to content

Commit 5093b37

Browse files
authored
Add support for Linux (#142)
1 parent f383f0c commit 5093b37

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

.changeset/soft-lies-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-llama": patch
3+
---
4+
5+
Remove non-working file selectors for Linux

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
node-version: [18, 20]
1919
python-version: ["3.11"]
20-
os: [macos-latest, windows-latest]
20+
os: [macos-latest, windows-latest, ubuntu-22.04]
2121
defaults:
2222
run:
2323
shell: bash

create-app.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,19 @@ export async function createApp({
151151
);
152152
}
153153

154+
if (
155+
dataSources.some((dataSource) => dataSource.type === "file") &&
156+
process.platform === "linux"
157+
) {
158+
console.log(
159+
yellow(
160+
`You can add your own data files to ${terminalLink(
161+
"data",
162+
`file://${root}/data`,
163+
)} folder manually.`,
164+
),
165+
);
166+
}
167+
154168
console.log();
155169
}

questions.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,30 @@ export const getDataSourceChoices = (
136136
value: "none",
137137
});
138138
choices.push({
139-
title: "Use an example PDF",
139+
title:
140+
process.platform !== "linux"
141+
? "Use an example PDF"
142+
: "Use an example PDF (you can add your own data files later)",
140143
value: "exampleFile",
141144
});
142145
}
143146

144-
choices.push(
145-
{
146-
title: `Use local files (${supportedContextFileTypes.join(", ")})`,
147-
value: "file",
148-
},
149-
{
150-
title:
151-
process.platform === "win32"
152-
? "Use a local folder"
153-
: "Use local folders",
154-
value: "folder",
155-
},
156-
);
147+
// Linux has many distros so we won't support file/folder picker for now
148+
if (process.platform !== "linux") {
149+
choices.push(
150+
{
151+
title: `Use local files (${supportedContextFileTypes.join(", ")})`,
152+
value: "file",
153+
},
154+
{
155+
title:
156+
process.platform === "win32"
157+
? "Use a local folder"
158+
: "Use local folders",
159+
value: "folder",
160+
},
161+
);
162+
}
157163

158164
if (framework === "fastapi") {
159165
choices.push({

0 commit comments

Comments
 (0)