From 928e50e08fe5c3e98c9a00bfea68e8835e194b04 Mon Sep 17 00:00:00 2001 From: owengaspard Date: Sat, 18 Jun 2022 16:05:18 -0500 Subject: [PATCH] Added PowerShell Script --- utils/envUpdate.py | 14 +++++++------- utils/envUpdateWin.ps1 | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/utils/envUpdate.py b/utils/envUpdate.py index 0b53ab3..05b08da 100644 --- a/utils/envUpdate.py +++ b/utils/envUpdate.py @@ -11,13 +11,13 @@ log = logging.getLogger(__name__) def envUpdate(): if path.exists(".env.template"): if platform == "win32" or platform == "cygwin": - #envTemplate = subprocess.run( - # [r'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', - # r'.\envUpdateWin.ps1'], - # stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - # shell=True - #) - print("Updating is not yet supported on Windows.") + envTemplate = subprocess.run( + [r'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', + r'.\envUpdateWin.ps1'], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + shell=True + print("Updating .env is unsupported on Windows.") + ) return elif platform == "darwin" or platform == "linux": envTemplate = subprocess.check_output( diff --git a/utils/envUpdateWin.ps1 b/utils/envUpdateWin.ps1 index a045a4b..79c8a04 100644 --- a/utils/envUpdateWin.ps1 +++ b/utils/envUpdateWin.ps1 @@ -1,2 +1,3 @@ -$envVars = Get-Content '.\.env' -$envVars -split "=" \ No newline at end of file +#$envVars = Get-Content '.\.env' +#$envVars -split "=" +Write-Host 'Updating the env is unsupported on Windows.' \ No newline at end of file