Skip to content

Commit

Permalink
Declare build script dependency on env variable
Browse files Browse the repository at this point in the history
Resolves #275.
  • Loading branch information
jhpratt committed Sep 11, 2020
1 parent 42250fb commit 28094d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Versioning].

---

## Unreleased

### Fixed

- The build script now declares a dependency on the `COMPILING_UNDER_CARGO_WEB`
environment variable.

## 0.2.18 [2020-09-08]

### Changed
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ macro_rules! warning {
}

fn main() {
println!("cargo:rerun-if-env-changed=COMPILING_UNDER_CARGO_WEB");

// Are we compiling with `cargo web`?
if env::var("COMPILING_UNDER_CARGO_WEB") == Ok("1".into()) {
cfg_emit!(__time_02_cargo_web);
Expand Down

0 comments on commit 28094d6

Please sign in to comment.