Closed berwyn closed 3 years ago
Hmmm, I don't know too much about powershell, but I think you might need to access env variables like this?
param (
$value = $env: value
)
I'm not 100% certain though. I just grabbed this from our maskfile.md which includes powershell blocks for Windows:
If this works, let me know and I can probably improve the README documentation with an example!
Aha, right! It totally went over my head that they're environment variables and that they need to be addressed as such! For some reason, I was thinking they were being passed as params. Thanks for the clarification, and sorry to distract you with a misunderstanding on my part!
I'm using Mask on Windows 10 and have a task in my
maskfile.md
that accepts an argument, however this seems to be empty when tested in the script. I've tested both the legacy Powershell that ships with the system (some flavour of 5.1) and the current preview release of the modern Powershell and in both cases Powershell will just output an empty line.OS: Windows 10 21313.1000 Shell: Powershell 5.1.21313.100, Powershell 7.2.0-preview.3