An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
April 17, 2024 03:24 am GMT
Original Link: https://dev.to/bachhuynh/cach-dua-bien-moi-truong-thanh-mot-phan-cua-mot-commandline-o-powershell-598n
Cch a bin mi trng thnh mt phn ca mt commandline PowerShell
Ti gp mt bi ton nh th ny:
Command ti cn chy:
.\octo.exe deploy-release --project ""ClientPortal"" --channel $ClientPortal_Channel --version=$ClientPortal_ReleaseNumber --deployto $ClientPortal_Env --ignoreSslErrors $ClientPortal_Tenant --progress --updateVariables
c bit vi $ClientPortal_Tenant l mt chui m ti mun n tr thnh mt phn ca command trn.
Gi tr ca $ClientPortal_Tenant l: --tenant ABC --tenant ABD --tenant ABE --tenant ABX
Nhng khi thc hin, th bo li ngay, v bin mi trng trong trng hp ny c hiu nh mt argument, ko phi l mt thnh phn ca command.
gii quyt, ta s dng lnh Invoke-Expression
, mt command trong powershell cho php thc thi lnh t mt chui c sn.
Sa li nh sau:
$ClientPortal=".\octo.exe deploy-release --project ""ClientPortal"" --channel $ClientPortal_Channel --version=$ClientPortal_ReleaseNumber --deployto $ClientPortal_Env --ignoreSslErrors $ClientPortal_Tenant --progress --updateVariables"> Invoke-Expression $ClientPortal
Original Link: https://dev.to/bachhuynh/cach-dua-bien-moi-truong-thanh-mot-phan-cua-mot-commandline-o-powershell-598n
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To