Skip to content

Commit

Permalink
test preview curriculum output
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrunde committed Jul 10, 2023
1 parent b3bf434 commit 48cc265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/cmd/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ preview and return/open the preview URL when it is complete.
return
}

return
// Removes artifacts on user's machine
defer removeArtifacts(tmpZipFile)

Expand Down Expand Up @@ -507,13 +508,13 @@ func createNewTarget(target string, singleFilePaths, dockerPaths []string) (stri
// to be nested in the .md file itself
targetArray := strings.Split(target, "/")
sourceLinkPath := trimFirstRune(filePath)
if len(targetArray[:len(targetArray)-1]) != 0 && !strings.HasSuffix(sourceLinkPath, ".sql") {
if len(targetArray[:len(targetArray)-1]) != 0 {
oneDirBackFromTarget := strings.Join(targetArray[:len(targetArray)-1], "/")
sourceLinkPath = oneDirBackFromTarget + filePath
}

if _, err := os.Stat(sourceLinkPath); os.IsNotExist(err) {
if strings.HasSuffix(sourceLinkPath, ".sql") {
if true {
useThisPath := ""
parent := "../" + sourceLinkPath
for i := 1; i <= 5; i++ {
Expand Down Expand Up @@ -651,6 +652,7 @@ func resourcesFromTarget(target string) (uniqueDockerPaths, uniqueResourcePaths

m := mdresourceparser.New([]rune(string(contents)))
dataPaths, dockerDirectoryPaths, testFilePaths, setupFilePaths := m.ParseResources()
fmt.Println("testFilePaths: %+v\n", testFilePaths)

Check failure on line 655 in app/cmd/preview.go

View workflow job for this annotation

GitHub Actions / test (1.17.x, ubuntu-latest)

Println call has possible formatting directive %+v

uniqueDockerPaths = uniq(dockerDirectoryPaths)

Expand Down

0 comments on commit 48cc265

Please sign in to comment.