facebook / facebook/watchman

Run the target script on start-up

Open
#841 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Is it possible to run the target script on watchman-make startup without making any file changes?

I have a polling script that runs in the foreground and outputs logs, which is why the foreground watchman-make tool is very convenient.

I use the following command to start watchman-make
`watchman-make -p '**/*.py' --run './restart.sh'`

and this script is run on file change.
```
pkill -f main
python -m main &
disown
```

However, i'd like watchman to run the `./restart.sh` script on start-up, so I don't have to make file changes to start my python process.

Can't do this, since the watchman-make command is never executed
```
python -m main
watchman-make -p '**/*.py' --run './restart.sh'
```

Same problem with this, the python command is never executed
```
watchman-make -p '**/*.py' --run './restart.sh'
python -m main
```

Is there any way around this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.