Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-AzureRMTemplate reports incorrect HTML file location. #367

Closed
deathly809 opened this issue Nov 8, 2017 · 2 comments
Closed

Test-AzureRMTemplate reports incorrect HTML file location. #367

deathly809 opened this issue Nov 8, 2017 · 2 comments
Assignees
Labels

Comments

@deathly809
Copy link
Member

Test-AzureRMTemplate reports that:

Report available at - E:\github\AzureStack-Tools\TemplateValidator\Test.html

but it is actually located in the directory I executed the cmdlet.

There are two fixes,

  1. Keep the HTML to placed at $Report and remove the variable $reportFilePath and use $Report
  2. Fix where to HTML is placed by using $reportFilePath variable instead of $Report variable.

A simple fix (which outputs into the TemplateValidator directory) should be to do the following:

245        ConvertTo-Html  $postContent -head $head -Body $reportHtml | out-File $Report
246    }
247    $reportFilePath = Join-Path $PSScriptRoot $Report
248    Write-Output "Validation Summary:

to

176    }
177    $reportFilePath = Join-Path $PSScriptRoot $Report
178    if (([System.IO.FileInfo]$Report).Extension -eq '.csv') {
...
245        ConvertTo-Html  $postContent -head $head -Body $reportHtml | out-File $reportFilePath
246    }
247    Write-Output "Validation Summary:
@knithinc
Copy link
Contributor

@sumantshiv , could you please take a look at this issue?

@marcvaneijk marcvaneijk assigned knithinc and unassigned sumantshiv Apr 12, 2018
deepaft added a commit to deepaft/AzureStack-Tools that referenced this issue Dec 20, 2018
…files and Azure#237 & Azure#367 Test-AzureRMTemplate output string contains incorrect report file path
knithinc pushed a commit that referenced this issue Jan 9, 2019
… and #237 & #367 Test-AzureRMTemplate output string contains incorrect report file path (#486)
@knithinc
Copy link
Contributor

knithinc commented Jan 9, 2019

Fixed.

@knithinc knithinc closed this as completed Jan 9, 2019
knithinc added a commit that referenced this issue Jan 11, 2019
…Profiles and #237 & #367 Test-AzureRMTemplate output string contains incorrect report file path (#486)"

This reverts commit e7c7c9c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants