Commit 5a2f7ea
committed
fix: cli --watch-poll not accept number correctly
The document say "--watch-poll" option can determine "The polling
interval for watching (also enable polling)". But the previous
implement only accept boolean value and no way to set the interval.
This patch try to fix this problem by allow number input like this:
"--watch-poll=100".
This patch also try to keep the original behavior not be changed as much
as possible. So "--watch-poll" and "--watch-poll=true" are still
acceptable (enable the polling ability).
But still has one incompatible change: original "--watch-poll=" mean
disable polling but after this fix it mean enable polling. It's due to
yargs can not differentiate the different between "--watch-poll" and
"--watch-poll=" when using string type option. So no way to workaround
for this problem.1 parent 990563f commit 5a2f7ea
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
| 171 | + | |
174 | 172 | | |
| 173 | + | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
0 commit comments