Merge pull request #233 from valkum/fix-symlink

resolve TempDir paths before passing them to the flake bin
This commit is contained in:
Zhaofeng Li 2024-11-08 12:03:41 -07:00 committed by GitHub
commit 68219763dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,6 @@
name: Build
on:
pull_request:
push:
jobs:
build:

View file

@ -1,6 +1,7 @@
name: Linters
on:
pull_request:
push:
jobs:
linters:

View file

@ -1,5 +1,6 @@
name: Tests
on:
pull_request:
push:
jobs:
tests:

View file

@ -51,7 +51,10 @@ impl Assets {
// We explicitly specify `path:` instead of letting Nix resolve
// automatically, which would involve checking parent directories
// for a git repository.
let uri = format!("path:{}", temp_dir.path().to_str().unwrap());
let uri = format!(
"path:{}",
temp_dir.path().canonicalize().unwrap().to_str().unwrap()
);
let _ = lock_flake_quiet(&uri).await;
let assets_flake = Flake::from_uri(uri).await?;
assets_flake_uri = Some(assets_flake.locked_uri().to_owned());