diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-08-05 11:26:06 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-08-05 11:26:06 -0600 |
commit | 31f1af0cabb65e3c5f8f4539500c6b236c387780 (patch) | |
tree | 7ddc6bbc3a8348e8f8c26e5fce82ea56557b2413 /src | |
parent | e4eae078a52fa4209bb5a46d21dbed09dd9c54ec (diff) |
don't crash if there's no drvPath
Diffstat (limited to 'src')
-rw-r--r-- | src/build-remote/build-remote.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 723e1463e..5247cefa6 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -181,9 +181,15 @@ static int _main(int argc, char * * argv) } // add the template values. + string drvstr; + if (drvPath.has_value()) + drvstr = drvPath->to_string(); + else + drvstr = "<unknown>"; + auto hint = hintformat(hintstring); hint - % drvPath->to_string() + % drvstr % neededSystem % concatStringsSep<StringSet>(", ", requiredFeatures) % machines.size(); |