Skip to content
Discussion options

You must be logged in to vote

It doesn't work:

  • this bit Set-Content -Path file.txt -Value "`"$filename`" will raise an error:
Set-Content: 
Line |
   3 |   Set-Content -Path file.txt -Value `$filename`
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | A positional parameter cannot be found that accepts argument 'Write-Output'.
  • while this bit Write-Output "`"$filename"`" will print just `$filename" to console

I think that `" is converted to a simple '.

In the end I decided to rewrite the series of command as pwsh script (ps1), so that the post_render look like this:

post-render: 
    - pwsh -Command ./post_render.ps1 'a string with some space.pdf'

And it works well enough.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

Answer selected by mcanouil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants