diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc
index 280212379..d7fdbb13d 100644
--- a/src/libcmd/installables.cc
+++ b/src/libcmd/installables.cc
@@ -636,7 +636,7 @@ DerivedPathsWithInfo InstallableFlake::toDerivedPaths()
                     }
                 }};
             } else
-                throw Error("flake output attribute '%s' evaluates to a string that does not denote a store path", attrPath);
+                throw Error("flake output attribute '%s' evaluates to the string '%s' which is not a store path", attrPath, s);
         }
 
         else