Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .changeset/fix-watch-mode-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/cli": patch
---

fix: call standalone isLocalTemplate function instead of thisArg.isLocalTemplate in runWatchMode to prevent TypeError crash when using --watch flag
2 changes: 1 addition & 1 deletion src/utils/generate/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export async function runWatchMode(
watcher = new Watcher(watchDir, ignorePaths);
}

if (!await thisArg.isLocalTemplate(path.resolve(generatorClass.DEFAULT_TEMPLATES_DIR, templateName))) {
if (!await isLocalTemplate(path.resolve(generatorClass.DEFAULT_TEMPLATES_DIR, templateName))) {
thisArg.warn(`WARNING: ${template} is a remote template. Changes may be lost on subsequent installations.`);
}

Expand Down
Loading