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
Add-Type -AssemblyName (Join-Path $runFolder "SharpScss.dll")
$options = new-object SharpScss.ScssOptions
$options.OutputStyle = [SharpScss.ScssOutputStyle] "Expanded"
$r1= [SharpScss.Scss]::ConvertFileToCss("file1.css", $options)
# the next line does NOT compile file2.css. It compiles file1.css.
$r2= [SharpScss.Scss]::ConvertFileToCss("file2.css", $options)
The cause of the problem is that the first call had options.InputFile set to null, and SharpScss changed that value to "file1.css". Then the second call was specifying the filename in two ways: options.InputFile and the filename parameter to the call. SharpCss chose the options.FIleName value instead of the parameter value.
IMO:
SharpScss should not change values in the Options object. If it needs to do so for internal convenience, it should clone the options and modify the clone
If options.InputFile and the filename parameter to the call specify different non-null values, an exception should be thrown.
The text was updated successfully, but these errors were encountered:
leotohill
changed the title
A second call to ConvertFilesToCss ignore the filename parameter.
A second call to ConvertFilesToCss ignores the filename parameter.
Sep 14, 2022
Repro with this Powershell
The cause of the problem is that the first call had options.InputFile set to null, and SharpScss changed that value to "file1.css". Then the second call was specifying the filename in two ways: options.InputFile and the filename parameter to the call. SharpCss chose the options.FIleName value instead of the parameter value.
IMO:
The text was updated successfully, but these errors were encountered: