You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some places use Join-Path, some use [IO.Path]::Combine(), and others just use string interpolation ($Path = "foo/$bar/baz" style). All three of these behave differently.
Currently CI passes in values assuming that we will concatenate a \ before appending more, but this is an unspoken convention and is not enforced. If we use [IO.Path]::Combine() and a bare drive letter is passed in (e.g. s:) this assumption breaks.
We should use Join-Path or Combine() everywhere, disallow bare drives as paths via [ValidatePattern('^(?!^[a-zA-Z]:$|^[a-zA-Z]:[^\\].*$).*$')] on the incoming params, and update the calling batch files to pass t:\ if they want stuff in the root.
The text was updated successfully, but these errors were encountered:
Some places use
Join-Path
, some use[IO.Path]::Combine()
, and others just use string interpolation ($Path = "foo/$bar/baz"
style). All three of these behave differently.Currently CI passes in values assuming that we will concatenate a
\
before appending more, but this is an unspoken convention and is not enforced. If we use[IO.Path]::Combine()
and a bare drive letter is passed in (e.g.s:
) this assumption breaks.We should use
Join-Path
orCombine()
everywhere, disallow bare drives as paths via[ValidatePattern('^(?!^[a-zA-Z]:$|^[a-zA-Z]:[^\\].*$).*$')]
on the incoming params, and update the calling batch files to passt:\
if they want stuff in the root.The text was updated successfully, but these errors were encountered: