diff --git a/.gitignore b/.gitignore index bc064b4..bdcb548 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea main -scripts/* \ No newline at end of file +scripts/* +custom-platforms-0.1.0 \ No newline at end of file diff --git a/pkg/diffr/handler.go b/pkg/diffr/handler.go index 9870a3b..853079b 100644 --- a/pkg/diffr/handler.go +++ b/pkg/diffr/handler.go @@ -134,9 +134,11 @@ func handler(w http.ResponseWriter, r *http.Request) { // Execute the templates with the provided data err := tmpl.Execute(w, data) if err != nil { + w.WriteHeader(http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError) return } + w.WriteHeader(http.StatusOK) }() wg.Wait() diff --git a/scripts/build.sh b/scripts/build.sh old mode 100644 new mode 100755 index d3010ec..3aa3aff --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -custom_package="diffr" +custom_package=$1 if [[ -z "$custom_package" ]]; then echo "Usage: $0 diffr [dir1/file1 dir2/file2]]" exit 1