Skip to content

Commit

Permalink
change java error to match clojure
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Feb 15, 2017
1 parent 7ffa4a9 commit bb0244a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions plugins/clojure/clojure.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (p *Plugin) Build(fn *function.Function, zip *archive.Zip) error {
if fn.Runtime != Runtime {
return nil
}

fn.Runtime = RuntimeCanonical

jar := filepath.Join(fn.Path, "target", jarFile)
Expand Down
9 changes: 4 additions & 5 deletions plugins/java/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,13 @@ func (p *Plugin) Build(fn *function.Function, zip *archive.Zip) error {
fn.Runtime = RuntimeCanonical

fn.Log.Debugf("searching for JAR (%s) in directories: %s", jarFile, strings.Join(jarSearchPaths, ", "))
expectedJarPath := findJar(fn.Path)
if expectedJarPath == "" {
return errors.New("Expected jar file not found")
jar := findJar(fn.Path)
if jar == "" {
return errors.Errorf("missing jar file %q", jar)
}
fn.Log.Debugf("found jar path: %s", expectedJarPath)

fn.Log.Debug("appending compiled files")
reader, err := azip.OpenReader(expectedJarPath)
reader, err := azip.OpenReader(jar)
if err != nil {
return err
}
Expand Down

0 comments on commit bb0244a

Please sign in to comment.