Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/serverlessFunction/functionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export class ServerlessFunctionModel implements Disposable {
const folders: Uri[] = [];
if (workspace.workspaceFolders) {
for (const wf of workspace.workspaceFolders) {
const entries = await fs.readdir(wf.uri.fsPath, { withFileTypes: true });
for (const file of entries) {
if (file.isDirectory() && fs.existsSync(path.join(wf.uri.fsPath, file.name, 'func.yaml'))) {
folders.push(Uri.file(path.join(wf.uri.fsPath, file.name)));
}
}
if (fs.existsSync(path.join(wf.uri.fsPath, 'func.yaml'))) {
folders.push(wf.uri);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function messageListener(panel: vscode.WebviewPanel, event: any): Promise<
let response: CliExitData;
const eventName = event.action;
const functionName = event.name;
const functionPath: vscode.Uri = event.folderPath ? vscode.Uri.from(event.folderPath) : undefined;
const functionPath: vscode.Uri = event.folderPath;
switch (eventName) {
case 'validateName':
const flag = validateName(functionName);
Expand Down