mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 23:42:43 +01:00
Merge pull request #12452 from NixOS/mergify/bp/2.25-maintenance/pr-12448
copyPathToStore(): Preserve symlinks (backport #12448)
This commit is contained in:
commit
d652513e45
2 changed files with 2 additions and 2 deletions
|
|
@ -2365,7 +2365,7 @@ StorePath EvalState::copyPathToStore(NixStringContext & context, const SourcePat
|
||||||
: [&]() {
|
: [&]() {
|
||||||
auto dstPath = fetchToStore(
|
auto dstPath = fetchToStore(
|
||||||
*store,
|
*store,
|
||||||
path.resolveSymlinks(),
|
path.resolveSymlinks(SymlinkResolution::Ancestors),
|
||||||
settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy,
|
settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy,
|
||||||
path.baseName(),
|
path.baseName(),
|
||||||
ContentAddressMethod::Raw::NixArchive,
|
ContentAddressMethod::Raw::NixArchive,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ echo "output path is $outPath"
|
||||||
[[ ! -w $outPath ]]
|
[[ ! -w $outPath ]]
|
||||||
|
|
||||||
text=$(cat "$outPath/hello")
|
text=$(cat "$outPath/hello")
|
||||||
if test "$text" != "Hello World!"; then exit 1; fi
|
[[ "$text" = "Hello World!" ]]
|
||||||
|
|
||||||
TODO_NixOS
|
TODO_NixOS
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue