dais-shell 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dais_shell-0.3.0 → dais_shell-0.3.1}/PKG-INFO +1 -1
- {dais_shell-0.3.0 → dais_shell-0.3.1}/pyproject.toml +1 -1
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/runtimes/PowershellRuntime.py +13 -5
- {dais_shell-0.3.0 → dais_shell-0.3.1}/README.md +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/__init__.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/constants.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/env_builder.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/iostream_reader.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/py.typed +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/runtimes/BaseShellRuntime.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/runtimes/BashRuntime.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/runtimes/__init__.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/types/__init__.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/types/command_step.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/types/exceptions.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/types/shell_script.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/utils/__init__.py +0 -0
- {dais_shell-0.3.0 → dais_shell-0.3.1}/src/dais_shell/utils/env_expander.py +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import base64
|
|
3
|
-
import json
|
|
4
3
|
import shutil
|
|
5
4
|
import re
|
|
6
5
|
import xml.etree.ElementTree as ET
|
|
@@ -15,6 +14,17 @@ from ..types.shell_script import ShellScript
|
|
|
15
14
|
from ..types.exceptions import ShellRuntimeNotFoundError
|
|
16
15
|
|
|
17
16
|
|
|
17
|
+
POWERSHELL_PREFERENCES = """
|
|
18
|
+
$ErrorActionPreference = "Stop"
|
|
19
|
+
$WarningPreference = "SilentlyContinue"
|
|
20
|
+
$VerbosePreference = "SilentlyContinue"
|
|
21
|
+
$DebugPreference = "SilentlyContinue"
|
|
22
|
+
$InformationPreference = "SilentlyContinue"
|
|
23
|
+
$ProgressPreference = "SilentlyContinue"
|
|
24
|
+
|
|
25
|
+
$PSNativeCommandArgumentPassing = "Standard"
|
|
26
|
+
""".strip()
|
|
27
|
+
|
|
18
28
|
@dataclass
|
|
19
29
|
class PowerShellScript(ShellScript):
|
|
20
30
|
@classmethod
|
|
@@ -27,8 +37,7 @@ class PowerShellScript(ShellScript):
|
|
|
27
37
|
|
|
28
38
|
def to_wrapper_script(self):
|
|
29
39
|
return f"""
|
|
30
|
-
|
|
31
|
-
$PSNativeCommandArgumentPassing = "Standard"
|
|
40
|
+
{POWERSHELL_PREFERENCES}
|
|
32
41
|
|
|
33
42
|
chcp 65001 | Out-Null
|
|
34
43
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
@@ -61,8 +70,7 @@ class PowerShellCommandStep(CommandStep):
|
|
|
61
70
|
return "'" + s.replace("'", "''") + "'"
|
|
62
71
|
|
|
63
72
|
script = f"""
|
|
64
|
-
|
|
65
|
-
$PSNativeCommandArgumentPassing = "Standard"
|
|
73
|
+
{POWERSHELL_PREFERENCES}
|
|
66
74
|
|
|
67
75
|
chcp 65001 | Out-Null
|
|
68
76
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|