-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(run): add --watch flag #634
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I don't know Go so just did a quick sanity review. Excited for this feature, I currently have a hacked together version of the functionality.
} | ||
}() | ||
|
||
err = watcher.Add(targetDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider excluding .git
from the directory, otherwise this will restart on e.g., making a commit if the .config/ags
is a git repo.
return | ||
} | ||
log.Println("event:", event) | ||
if event.Has(fsnotify.Write) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
events don't seem like they'll be caught here (rename and create ones will also fire a Write it looks like). That's probably fine but worth a comment IMO
Hi ! |
Add
--watch
flag forags run
.