Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Dec 18, 2024
1 parent d84eeaa commit 680f422
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/src/commands/dev/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ export default class DevCommand extends BaseCommand {
// Whenever any of the env files change, copy to the build directory.
// The runtime will automatically reload them when it detects a change to the copies in the build folder.

const onAddOrChange = async (sourcePath: string) => {
const onAddOrChange = async (sourcePath: string | Error) => {
if (sourcePath instanceof Error) {
return;
}
const filename = path.basename(sourcePath);
const outputPath = path.join(appPath, "build", filename);
try {
Expand Down Expand Up @@ -245,6 +248,9 @@ export default class DevCommand extends BaseCommand {
.on("add", onAddOrChange)
.on("change", onAddOrChange)
.on("unlink", async (sourcePath) => {
if (sourcePath instanceof Error) {
return;
}
const filename = path.basename(sourcePath);
const outputPath = path.join(appPath, "build", filename);
try {
Expand Down

0 comments on commit 680f422

Please sign in to comment.