mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
Workaround for https://github.com/docker/for-win/issues/1588
This commit is contained in:
parent
305ef606ce
commit
9ddc0120cb
1 changed files with 12 additions and 2 deletions
14
dbench
14
dbench
|
|
@ -3,11 +3,21 @@
|
||||||
function run () {
|
function run () {
|
||||||
user=$1
|
user=$1
|
||||||
shift
|
shift
|
||||||
docker exec -itu "${user}" frappe bash -c "$@"
|
if [ -f '/usr/bin/winpty' ]; then
|
||||||
|
# Workaround for https://github.com/docker/for-win/issues/1588
|
||||||
|
/usr/bin/winpty docker exec -itu "${user}" frappe bash -c "$@"
|
||||||
|
else
|
||||||
|
docker exec -itu "${user}" frappe bash -c "$@"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
docker exec -it frappe bash
|
if [ -f '/usr/bin/winpty' ]; then
|
||||||
|
# Workaround for https://github.com/docker/for-win/issues/1588
|
||||||
|
/usr/bin/winpty docker exec -it frappe bash
|
||||||
|
else
|
||||||
|
docker exec -it frappe bash
|
||||||
|
fi
|
||||||
elif [[ "$1" == 'init' ]]; then
|
elif [[ "$1" == 'init' ]]; then
|
||||||
run root "chown -R frappe:frappe /home/frappe"
|
run root "chown -R frappe:frappe /home/frappe"
|
||||||
run frappe "cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench"
|
run frappe "cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue