Skip to content

Commit 7b7dcb9

Browse files
committed
format powershell script
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
1 parent 82124b7 commit 7b7dcb9

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Compare
66

7-
* https://github.com/khs1994-docker/lnmp/compare/v19.03.11...19.03
7+
* https://github.com/khs1994-docker/lnmp/compare/v19.03.11...v19.03.12
88

99
### Bug fixes:
1010

lnmp-docker.ps1

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,16 @@ Function satis() {
507507
Write-Warning "Please modify ${APP_ROOT}/satis/satis.json"
508508
}
509509

510-
docker run --rm -it `
511-
--mount type=bind, src=${APP_ROOT}/satis, target=/build `
512-
--mount type=volume, src=lnmp_composer-cache-data, target=/composer composer/satis
510+
if ($env:USE_WSL2_DOCKER_COMPOSE -eq '1') {
511+
wsl -d $WSL2_DIST -- docker run --rm -it `
512+
--mount type=bind, src=${APP_ROOT}/satis, target=/build `
513+
--mount type=volume, src=lnmp_composer-cache-data, target=/composer composer/satis
514+
}
515+
else {
516+
docker run --rm -it `
517+
--mount type=bind, src=${APP_ROOT}/satis, target=/build `
518+
--mount type=volume, src=lnmp_composer-cache-data, target=/composer composer/satis
519+
}
513520
}
514521

515522
Function get_compose_options($compose_files, $isBuild = 0) {
@@ -728,7 +735,12 @@ function _pcit_cp() {
728735
rm -r -force ${APP_ROOT}/.pcit
729736
# git clone --depth=1 https://github.com/pcit-ce/pcit ${APP_ROOT}/.pcit
730737
docker pull pcit/pcit:frontend
731-
docker run -it --rm -v ${APP_ROOT}/.pcit/public:/var/www/pcit/public pcit/pcit:frontend
738+
if ($env:USE_WSL2_DOCKER_COMPOSE -eq '1') {
739+
wsl -d $WSL2_DIST -- docker run -it --rm -v ${APP_ROOT}/.pcit/public:/var/www/pcit/public pcit/pcit:frontend
740+
}
741+
else {
742+
docker run -it --rm -v ${APP_ROOT}/.pcit/public:/var/www/pcit/public pcit/pcit:frontend
743+
}
732744
}
733745

734746
function _edit_hosts() {

0 commit comments

Comments
 (0)