mirror of
https://github.com/strongdm/comply
synced 2024-11-22 07:34:54 +00:00
more verbose output in the interest of educating users on input and output paths
This commit is contained in:
parent
e97f0684ac
commit
8fbc7ab65a
@ -59,9 +59,7 @@ func html(output string, live bool, errCh chan error, wg *sync.WaitGroup) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if live {
|
fmt.Printf("%s -> %s\n", filepath.Join("templates", fileInfo.Name()), outputFilename)
|
||||||
fmt.Printf("%s -> %s\n", filepath.Join("templates", fileInfo.Name()), outputFilename)
|
|
||||||
}
|
|
||||||
|
|
||||||
tpl, err := ace.Load("", filepath.Join("templates", basename), aceOpts)
|
tpl, err := ace.Load("", filepath.Join("templates", basename), aceOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -49,14 +49,6 @@ func renderNarrativeToDisk(wg *sync.WaitGroup, errOutputCh chan error, data *ren
|
|||||||
go func(p *model.Narrative) {
|
go func(p *model.Narrative) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
if live {
|
|
||||||
rel, err := filepath.Rel(config.ProjectRoot(), p.FullPath)
|
|
||||||
if err != nil {
|
|
||||||
rel = p.FullPath
|
|
||||||
}
|
|
||||||
fmt.Printf("%s -> %s\n", rel, filepath.Join("output", p.OutputFilename))
|
|
||||||
}
|
|
||||||
|
|
||||||
outputFilename := p.OutputFilename
|
outputFilename := p.OutputFilename
|
||||||
// save preprocessed markdown
|
// save preprocessed markdown
|
||||||
err = preprocessNarrative(data, p, filepath.Join(".", "output", outputFilename+".md"))
|
err = preprocessNarrative(data, p, filepath.Join(".", "output", outputFilename+".md"))
|
||||||
@ -112,6 +104,13 @@ func renderNarrativeToDisk(wg *sync.WaitGroup, errOutputCh chan error, data *ren
|
|||||||
errOutputCh <- err
|
errOutputCh <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rel, err := filepath.Rel(config.ProjectRoot(), p.FullPath)
|
||||||
|
if err != nil {
|
||||||
|
rel = p.FullPath
|
||||||
|
}
|
||||||
|
fmt.Printf("%s -> %s\n", rel, filepath.Join("output", p.OutputFilename))
|
||||||
|
|
||||||
}(narrative)
|
}(narrative)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +49,6 @@ func renderPolicyToDisk(wg *sync.WaitGroup, errOutputCh chan error, data *render
|
|||||||
go func(p *model.Policy) {
|
go func(p *model.Policy) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
if live {
|
|
||||||
rel, err := filepath.Rel(config.ProjectRoot(), p.FullPath)
|
|
||||||
if err != nil {
|
|
||||||
rel = p.FullPath
|
|
||||||
}
|
|
||||||
fmt.Printf("%s -> %s\n", rel, filepath.Join("output", p.OutputFilename))
|
|
||||||
}
|
|
||||||
|
|
||||||
outputFilename := p.OutputFilename
|
outputFilename := p.OutputFilename
|
||||||
// save preprocessed markdown
|
// save preprocessed markdown
|
||||||
err = preprocessPolicy(data, p, filepath.Join(".", "output", outputFilename+".md"))
|
err = preprocessPolicy(data, p, filepath.Join(".", "output", outputFilename+".md"))
|
||||||
@ -110,6 +102,12 @@ func renderPolicyToDisk(wg *sync.WaitGroup, errOutputCh chan error, data *render
|
|||||||
errOutputCh <- err
|
errOutputCh <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rel, err := filepath.Rel(config.ProjectRoot(), p.FullPath)
|
||||||
|
if err != nil {
|
||||||
|
rel = p.FullPath
|
||||||
|
}
|
||||||
|
fmt.Printf("%s -> %s\n", rel, filepath.Join("output", p.OutputFilename))
|
||||||
}(policy)
|
}(policy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user