I had to do this yesterday. First I tried ". Then \", finally \" worked. Which doesn't make sense. But I'm not looking for answers, I've got more Jira tickets this sprint.
Run a PowerShell script from batch, but call it using start-process as administrator, using a variable for the path and also pass parameters to the script.
11 Comments
CandleTiger@programming.dev · 16 pts · 342d
Aaaaaaaaaaaaaaaaaaa No!!!!! My data! Please stop doing that!
monkeyman512@lemmy.world · 4 pts · 342d
I think I have seen a few CLI tools that put the input between an open and close arg like this "-arg1 random passthrough string -arg1-"
ulterno@programming.dev · 1 pts · 342d
Now say the CLI tool is passed a string that has "-arg1-" inside it.
deadbeef79000@lemmy.nz · 13 pts · 342d
Hupf@feddit.org · 4 pts · 341d
https://xkcd.com/297/
leds@feddit.dk · 7 pts · 342d
Oh you mean a pipiline defined in yaml, running in poweshell to execute a command in docker on windows?
bobzrkr@sh.itjust.works · 3 pts · 342d
I had to do this yesterday. First I tried ". Then \", finally \" worked. Which doesn't make sense. But I'm not looking for answers, I've got more Jira tickets this sprint.
bobzrkr@sh.itjust.works · 4 pts · 342d
LOL even here it gets me . I tried slash quote, slash slash slash quote, finally slash slash quote worked.
someacnt@sh.itjust.works · 3 pts · 342d
You mean
\",\\", and\\\"?rikudou@lemmings.world · 1 pts · 338d
I added an expression support to my Automod for Lemmy which can have subexpressions as parameters etc., pretty cool to work with.
Except every subexpression needs 2^n-1 slashes where n is the depth level. Fun times writing the expressions.
SpikesOtherDog@ani.social · 1 pts · 342d
Run a PowerShell script from batch, but call it using start-process as administrator, using a variable for the path and also pass parameters to the script.