From 6c81a5bf94fd10b4137bf3e962647f734bb727ec Mon Sep 17 00:00:00 2001 From: Ronaldo Zefi Date: Tue, 14 Feb 2023 21:09:00 +0100 Subject: [PATCH] Solved export backend.zip error on windows (#538) --- pynecone/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynecone/utils.py b/pynecone/utils.py index 8bd0c302b..492f2145a 100644 --- a/pynecone/utils.py +++ b/pynecone/utils.py @@ -524,7 +524,7 @@ def nt_export(backend: bool = True, frontend: bool = True): cmd = r'''powershell -Command "Set-Location .web/_static; Compress-Archive -Path .\* -DestinationPath ..\..\frontend.zip -Force"''' os.system(cmd) if backend: - cmd = r'''powershell -Command "Get-ChildItem .\* -Directory | where {`$_.Name -notin @('.web', 'assets', 'frontend.zip', 'backend.zip')} | Compress-Archive -DestinationPath backend.zip -Update"''' + cmd = r'''powershell -Command "Get-ChildItem -File | Where-Object { $_.Name -notin @('.web', 'assets', 'frontend.zip', 'backend.zip') } | Compress-Archive -DestinationPath backend.zip -Update"''' os.system(cmd)