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 name: Build
on: on:
pull_request:
push: push:
jobs: jobs:
build: build:

View file

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

View file

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

View file

@ -51,7 +51,10 @@ impl Assets {
// We explicitly specify `path:` instead of letting Nix resolve // We explicitly specify `path:` instead of letting Nix resolve
// automatically, which would involve checking parent directories // automatically, which would involve checking parent directories
// for a git repository. // 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 _ = lock_flake_quiet(&uri).await;
let assets_flake = Flake::from_uri(uri).await?; let assets_flake = Flake::from_uri(uri).await?;
assets_flake_uri = Some(assets_flake.locked_uri().to_owned()); assets_flake_uri = Some(assets_flake.locked_uri().to_owned());