aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_System.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/vcpkg_System.cpp')
-rw-r--r--toolsrc/src/vcpkg_System.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index 679318768..9609d819b 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -49,6 +49,17 @@ namespace vcpkg::System
return { ec, output };
}
+ std::wstring create_powershell_script_cmd(const fs::path& script_path)
+ {
+ return create_powershell_script_cmd(script_path, L"");
+ }
+
+ std::wstring create_powershell_script_cmd(const fs::path& script_path, const std::wstring& args)
+ {
+ // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
+ return Strings::wformat(LR"(powershell -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
+ }
+
void print(const char* message)
{
fputs(message, stdout);