Skip to content

Commit

Permalink
fix update env var
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Dec 30, 2024
1 parent e397a9b commit b5e0ede
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions crates/unavi-app/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
// Store the target, used for self-updating.
println!(
"cargo:rustc-env=TARGET={}",
std::env::var("TARGET").unwrap()
);
}
2 changes: 0 additions & 2 deletions crates/unavi-app/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ let
];

postInstall = ''
mv $out/bin/* $out
rm -r $out/bin
cp -r crates/unavi-app/assets $out
cp LICENSE $out
'';
Expand Down
2 changes: 1 addition & 1 deletion crates/unavi-app/src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn check_for_updates() -> Result<()> {
println!("Checking for updates...");

// Get latest GitHub release.
let target = std::env::var("TARGET")?;
let target = env!("TARGET");
let pkg = env!("CARGO_PKG_NAME");

let target = if target.contains("linux") {
Expand Down

0 comments on commit b5e0ede

Please sign in to comment.