Fix echo usage under macOS
This commit is contained in:
parent
0b6cd1cb6c
commit
6963d2ae71
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import platform
|
||||||
|
|
||||||
from wk.exe import run_program
|
from wk.exe import run_program
|
||||||
|
|
||||||
|
|
@ -88,14 +89,18 @@ def prep_action(
|
||||||
action_cmd.append(cmd)
|
action_cmd.append(cmd)
|
||||||
elif text:
|
elif text:
|
||||||
# Display text
|
# Display text
|
||||||
|
echo_cmd = ['echo']
|
||||||
|
if platform.system() == 'Linux':
|
||||||
|
echo_cmd.append('-e')
|
||||||
action_cmd.extend([
|
action_cmd.extend([
|
||||||
'watch',
|
'watch',
|
||||||
'--color',
|
'--color',
|
||||||
'--exec',
|
'--exec',
|
||||||
'--no-title',
|
'--no-title',
|
||||||
'--interval', '1',
|
'--interval', '1',
|
||||||
'echo', '-e', text,
|
|
||||||
])
|
])
|
||||||
|
action_cmd.extend(echo_cmd)
|
||||||
|
action_cmd.append(text)
|
||||||
elif watch_file:
|
elif watch_file:
|
||||||
# Monitor file
|
# Monitor file
|
||||||
prep_file(watch_file)
|
prep_file(watch_file)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue