Skip to content
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

Make the watch and watch script options behave more intuitively #495

Closed
wants to merge 1 commit into from

Conversation

K-Phoen
Copy link
Member

@K-Phoen K-Phoen commented Sep 17, 2024

Related to #492

This PR makes grr serve behave in a more intuitive manner when the -S flag is used.
With this change, -S (watch script) implies -w (watch). Furthermore, the given resources path is no longer ignored when a watch script is given.

@K-Phoen K-Phoen self-assigned this Sep 17, 2024
@K-Phoen K-Phoen requested a review from a team September 17, 2024 15:05
Comment on lines +184 to +187
_, err = s.ParseResources(s.ResourcePath)
if err != nil {
fmt.Print(err)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you're parsing resources for all invocations. But, with a watchScript, surely the path(s) provided are just to things to watch. We don't want to be parsing my-dashboard.ts for example? That's why it doesn't parse when watchScript is set.

@K-Phoen K-Phoen force-pushed the issue-492/more-intuitive-watch branch from 4e62bdb to d1e7a90 Compare September 17, 2024 22:08
@K-Phoen K-Phoen closed this Dec 5, 2024
@K-Phoen K-Phoen deleted the issue-492/more-intuitive-watch branch December 5, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants