Skip to content

Conversation

@brdeyo
Copy link
Contributor

@brdeyo brdeyo commented Apr 24, 2025

In order to allow Virtual Client to be better positioned to support script extensions development, the ability to quickly execute a script on the local file system is imperative. The features in this changeset enable a user to provide a PowerShell, Python or random script/command to VC directly on the command line without need to create or modify any profiles.

Usage Examples:

# Scripts in a folder anywhere on the local system.
VirtualClient.exe pwsh "S:\Demo\content.example.package\Invoke-OpenSsl.ps1 -LogDirectory S:\Demo\content.example.package\logs\demo_pwsh" --clean=logs --log-to-file --verbose

VirtualClient.exe python "S:\Demo\content.example.package\execute_openssl.py1 S:\Demo\content.example.package\logs\demo_python" --clean=logs --log-to-file --verbose

# Scripts in the VC packages folder
VirtualClient.exe pwsh ".\packages\content.example.package\Invoke-OpenSsl.ps1 -LogDirectory .\logs\demo_pwsh" --clean=logs --log-to-file --verbose

VirtualClient.exe python ".\packages\content.example.package\execute_openssl.py .\logs\demo_python" --clean=logs --log-to-file --verbose

# Integration with bootstrapping feature
VirtualClient bootstrap --package=content.example.package.1.0.0.zip --name=content.example.package.1.0.0 --packages="%PACKAGE_STORE%" --clean=packages

VirtualClient.exe pwsh ".\packages\content.example.package.1.0.0\Invoke-OpenSsl.ps1 -LogDirectory .\logs\demo_pwsh" --clean=logs --log-to-file --verbose

# Support for commands
VirtualClient.exe command "pip install -r S:\Demo\content.example.package\setup\requirements.txt" --clean=logs --log-to-file --verbose

@yangpanMS
Copy link
Contributor

I'm thinking if we just do
VirtualClient.exe command "pwsh S:\a.ps1"
instead of a
VirtualClient pwsh "S:\a.ps1"

@brdeyo brdeyo force-pushed the brdeyo/vc-loose-script-support branch from c99e964 to 8ba12f7 Compare April 28, 2025 22:52
@brdeyo brdeyo force-pushed the brdeyo/vc-loose-script-support branch from 8ba12f7 to 83ce596 Compare April 28, 2025 22:54
@brdeyo
Copy link
Contributor Author

brdeyo commented Apr 29, 2025

We have confirmation on the changes from the reviewer.

@brdeyo brdeyo merged commit c47e772 into main Apr 29, 2025
5 checks passed
@brdeyo brdeyo deleted the brdeyo/vc-loose-script-support branch April 29, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants