Skip to content

Commit 972698a

Browse files
committed
Incorporate PR review feedback
1 parent 3f71e8b commit 972698a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runners/cloud-hypervisor.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let
4343
userVSockPath = extractParamValue "socket" userVSockStr;
4444
userVSockCID = extractParamValue "cid" userVSockStr;
4545
vsockCID = if vsock.cid != null && userVSockCID != null
46-
then throw "Cannot set `microvm.vsock.cid` and --vsock 'cid=${userVSockCID}...' from `microvm.cloud-hypervisor.extraArgs` at the same time"
46+
then throw "Cannot set `microvm.vsock.cid` and --vsock 'cid=${userVSockCID}...' via `microvm.cloud-hypervisor.extraArgs` at the same time"
4747
else if vsock.cid != null
4848
then vsock.cid
4949
else userVSockCID;
@@ -131,7 +131,7 @@ let
131131
platformExtracted = extractOptValues "--platform" extraArgs;
132132
extraArgsWithoutPlatform = platformExtracted.args;
133133
userPlatformOpts = platformExtracted.values;
134-
userPlatformStr = if userPlatformOpts == [] then "" else builtins.head userPlatformOpts;
134+
userPlatformStr = lib.optionalString (userPlatformOpts != []) (builtins.head userPlatformOpts);
135135
userHasOemStrings = (extractParamValue "oem_strings" userPlatformStr) != null;
136136
platformOps =
137137
if userHasOemStrings then

0 commit comments

Comments
 (0)