From 8bae7db9fa0da24d8d5edcf8f635bb8a514084f4 Mon Sep 17 00:00:00 2001 From: itowlson Date: Mon, 30 Oct 2023 10:44:38 +1300 Subject: [PATCH] Fix watchexec missing files in subdirectories Signed-off-by: itowlson --- src/commands/watch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/watch.rs b/src/commands/watch.rs index 83ff74ffee..10ba72e5bb 100644 --- a/src/commands/watch.rs +++ b/src/commands/watch.rs @@ -7,6 +7,7 @@ use std::{ use anyhow::{Context, Result}; use clap::Parser; use itertools::Itertools; +use path_absolutize::Absolutize; use spin_common::paths::parent_dir; use uuid::Uuid; use watchexec::Watchexec; @@ -93,6 +94,7 @@ impl WatchCommand { let spin_bin = std::env::current_exe()?; let manifest_file = spin_common::paths::resolve_manifest_file_path(&self.app_source)?; + let manifest_file = manifest_file.absolutize()?.to_path_buf(); // or watchexec misses files in subdirectories let manifest_dir = parent_dir(&manifest_file)?; // Set up the event processors (but don't start them yet).