lord-executor / pwshrun Goto Github PK
View Code? Open in Web Editor NEWSimple PowerShell Core task runner
License: MIT License
Simple PowerShell Core task runner
License: MIT License
Often, a specific task requires a specific external tool to be installed in order to work correctly. For example, using bat in a task, obviously requires bat to be available in in the path.
It would be nice to be able to declare dependencies together with the task metadata like so:
PwshRun-RegisterTasks "mybundle" @(
@{
Alias = "dostuff";
Command = "MyBundle-DoStuff";
Description = "Does stuff";
Example = "`$RUNNER dostuff";
Dependencies = @("bat")
}
)
Line 183 in 0f23719
Ever seen this message:
PropertyNotFoundException: C:\Users\dtm\Documents\PowerShell\Modules\PwshRun\1.3.2\pwshrun-bootstrap.ps1:183
Line |
183 | if ($taskArgs.Length -eq 0) {
| ~~~~~~~~~~~~~~~~~~~~~~
| The property 'Length' cannot be found on this object. Verify that the property exists.
So, I did some digging, and... while $taskArgs
really does seem to be an IList<object>
, powershell seems to be totally weird about it and (probably) wraps collections internally or something.
According to https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-arrays?view=powershell-7.3#count, you can actually just use the .count
property to get the length (tested on my machine). Note the lowercase. That's intentional.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.