Skip to content

Commit

Permalink
Merge pull request #1983 from itowlson/fix-watch-misses-files-in-subdirs
Browse files Browse the repository at this point in the history
Fix watchexec missing files in subdirectories
  • Loading branch information
itowlson authored Oct 30, 2023
2 parents 3185092 + 8bae7db commit d783dec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit d783dec

Please # to comment.