fermyon / cloud-plugin

A Spin plugin for the Spin CLI for managing Spin apps in Fermyon Cloud.
https://developer.fermyon.com/cloud/
Apache License 2.0
8 stars 13 forks source link

fix(build.rs): don't fail on error #78

Closed vdice closed 10 months ago

vdice commented 1 year ago

I'm unable to build this plugin when fail_on_error() is set in the build script, due to vergen claiming that I am not in a valid git worktree:

$ cargo build --release
...
error: failed to run custom build command for `cloud-plugin v0.1.2 (/Users/vdice/go/src/github.com/fermyon/cloud-plugin)`

Caused by:
  process didn't exit successfully: `/Users/vdice/go/src/github.com/fermyon/cloud-plugin/target/release/build/cloud-plugin-56e76e8961f4ea6a/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'failed to extract build information: not within a suitable 'git' worktree!', build.rs:7:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

I noticed we've also removed the fail_on_error() toggle in Spin (https://github.com/fermyon/spin/pull/1590), so I propose we do the same here.

vdice commented 10 months ago

(I've since fixed my machine such that the error no longer occurs; closing.)